(MDL-8973) Fix OOP model of new multi auth plugins + some other auth related fixes, fixed change_password, ldap updates, etc.; TODO: fix docs

This commit is contained in:
skodak
2007-03-22 12:27:52 +00:00
parent 6a5e9a8506
commit 6bc1e5d577
37 changed files with 658 additions and 432 deletions
+9 -11
View File
@@ -70,20 +70,18 @@
$usernew->timemodified = time();
if (update_record('user', $usernew)) {
if (method_exists($authplugin, 'user_update')){
// pass a true $userold here
if (! $authplugin->user_update($user, $userform->get_data(false))) {
// auth update failed, rollback for moodle
update_record('user', addslashes_object($user));
error('Failed to update user data on external auth: '.$usernew->auth.
'. See the server logs for more details.');
}
};
} else {
if (!update_record('user', $usernew)) {
error('Error updating user record');
}
// pass a true $userold here
if (! $authplugin->user_update($user, $userform->get_data(false))) {
// auth update failed, rollback for moodle
update_record('user', addslashes_object($user));
error('Failed to update user data on external auth: '.$usernew->auth.
'. See the server logs for more details.');
}
//update preferences
useredit_update_user_preference($usernew);