diff --git a/user/edit.php b/user/edit.php index 9c4a880cece..2e1e3d5a12b 100644 --- a/user/edit.php +++ b/user/edit.php @@ -167,6 +167,7 @@ if ($email_changed && $CFG->emailchangeconfirmation) { $temp_user = fullclone($user); $temp_user->email = $usernew->preference_newemail; + $temp_user->emailstop = NULL; $a = new stdClass(); $a->url = $CFG->wwwroot . '/user/emailupdate.php?key=' . $usernew->preference_newemailkey . '&id=' . $user->id; @@ -176,7 +177,7 @@ $emailupdatemessage = get_string('auth_emailupdatemessage', 'auth', $a); $emailupdatetitle = get_string('auth_emailupdatetitle', 'auth', $a); - if(!$mail_results = email_to_user($temp_user, get_admin(), $emailupdatetitle, $emailupdatemessage)) { + if (!$mail_results = email_to_user($temp_user, get_admin(), $emailupdatetitle, $emailupdatemessage)) { die("could not send email!"); } } diff --git a/user/emailupdate.php b/user/emailupdate.php index cc28cc274da..9991aff5e4e 100755 --- a/user/emailupdate.php +++ b/user/emailupdate.php @@ -1,4 +1,5 @@ libdir.'/adminlib.php'); require_once($CFG->dirroot.'/user/editlib.php');