mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-63887 auth_ldap: fix unclean exit from sync when users not found
We should return, not exit, and we should clean up before we do.
This commit is contained in:
parent
84e8e17820
commit
39ac02f424
@ -753,7 +753,9 @@ class auth_plugin_ldap extends auth_plugin_base {
|
||||
$count = $DB->count_records_sql('SELECT COUNT(username) AS count, 1 FROM {tmp_extuser}');
|
||||
if ($count < 1) {
|
||||
print_string('didntgetusersfromldap', 'auth_ldap');
|
||||
exit;
|
||||
$dbman->drop_table($table);
|
||||
$this->ldap_close();
|
||||
return false;
|
||||
} else {
|
||||
print_string('gotcountrecordsfromldap', 'auth_ldap', $count);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user