MDL-17559 user edit: fixed undefined email property warnings
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@
|
||||
|
||||
if ($CFG->emailchangeconfirmation) {
|
||||
// Handle change of email carefully for non-trusted users
|
||||
if ($user->email != $usernew->email && !has_capability('moodle/user:update', $systemcontext)) {
|
||||
if (isset($usernew->email) and $user->email != $usernew->email && !has_capability('moodle/user:update', $systemcontext)) {
|
||||
$a = new stdClass();
|
||||
$a->newemail = $usernew->preference_newemail = $usernew->email;
|
||||
$usernew->preference_newemailkey = random_string(20);
|
||||
|
||||
Reference in New Issue
Block a user