mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-40558 skip admins and guest when deleting incomplete users
This commit is contained in:
parent
07bbbcf174
commit
98aa874617
1 changed files with 3 additions and 0 deletions
|
@ -99,6 +99,9 @@ function cron_run() {
|
|||
AND (lastname = '' OR firstname = '' OR email = '')",
|
||||
array($cuttime));
|
||||
foreach ($rs as $user) {
|
||||
if (isguestuser($user) or is_siteadmin($user)) {
|
||||
continue;
|
||||
}
|
||||
delete_user($user);
|
||||
mtrace(" Deleted not fully setup user $user->username ($user->id)");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue