Commit 3afbdcb2 authored by Dan Poltawski's avatar Dan Poltawski
Browse files

Merge branch 'MDL-51837-28' of git://github.com/junpataleta/moodle into MOODLE_28_STABLE

parents 4d47398b 37ccc13b
......@@ -272,7 +272,7 @@ class user_editadvanced_form extends moodleform {
}
}
if (!$user or $user->email !== $usernew->email) {
if (!$user or (isset($usernew->email) && $user->email !== $usernew->email)) {
if (!validate_email($usernew->email)) {
$err['email'] = get_string('invalidemail');
} else if ($DB->record_exists('user', array('email' => $usernew->email, 'mnethostid' => $CFG->mnet_localhost_id))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment