mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-13811: Merged fix to work when email is disabled
This commit is contained in:
parent
ec885ec6f8
commit
184c7638f5
@ -166,6 +166,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;
|
||||
@ -175,7 +176,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!");
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php // $Id$
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->dirroot.'/user/editlib.php');
|
||||
|
Loading…
x
Reference in New Issue
Block a user