diff --git a/backend/scripts/provision_staff_account.php b/backend/scripts/provision_staff_account.php index 63a78c3..ff0c682 100644 --- a/backend/scripts/provision_staff_account.php +++ b/backend/scripts/provision_staff_account.php @@ -55,7 +55,7 @@ try { $staffId = (int)$staff['id']; $action = 'updated'; } else { - $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); + $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)); $staffId = Database::insert('INSERT INTO staff_accounts (uuid, identity_id, full_name, role, school_id, directorate_id, status) VALUES (?, ?, ?, ?, ?, ?, \'active\')', [$uuid, $identityId, $name, $role, $schoolId, $directorateId]); $action = 'created'; }