From: skodak Date: Sun, 27 Sep 2009 09:23:28 +0000 (+0000) Subject: MDL-20209 fixed regression - the email has to be synced with ext auth when change... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=12058e63adbc2de08a6ad62682f5a679c3f49089;p=moodle.git MDL-20209 fixed regression - the email has to be synced with ext auth when change confirmed --- diff --git a/user/emailupdate.php b/user/emailupdate.php index 6cb2d9cd69..b7b658b6bd 100755 --- a/user/emailupdate.php +++ b/user/emailupdate.php @@ -55,6 +55,7 @@ if (empty($preferences['newemailattemptsleft'])) { echo $OUTPUT->box($stroutofattempts, 'center'); } elseif ($key == $preferences['newemailkey']) { + $olduser = clone($user); cancel_email_update($user->id); $user->email = $preferences['newemail']; @@ -66,6 +67,8 @@ if (empty($preferences['newemailattemptsleft'])) { } else { // update user email $DB->set_field('user', 'email', $user->email, array('id' => $user->id)); + $authplugin = get_auth_plugin($user->auth); + $authplugin->user_update($olduser, $user); events_trigger('user_updated', $user); $a->email = $user->email; $stremailupdatesuccess = get_string('auth_emailupdatesuccess', 'auth_email', $a);