Skip to content

Commit

Permalink
MDL-79362 auth_ldap: Close transaction when user fails to create
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Feb 17, 2025
1 parent 3c848c4 commit df12260
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions auth/ldap/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ public function sync_users_update_callback(?callable $updatecallback = null): bo
} catch (Exception $e) {
print_string('invaliduserexception', 'auth_ldap', print_r($user, true) . $e->getMessage());
$errors++;
$transaction->allow_commit();
continue;
}
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
Expand Down

0 comments on commit df12260

Please sign in to comment.