MDL-59929 signup: inprove usability when duplicate email entered

This commit is contained in:
Tim Hunt
2017-08-24 16:33:24 +01:00
parent 5e7cb19d97
commit e3993969d6
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -845,7 +845,9 @@ function signup_validate_data($data, $files) {
$errors['email'] = get_string('invalidemail');
} else if ($DB->record_exists('user', array('email' => $data['email']))) {
$errors['email'] = get_string('emailexists').' <a href="forgot_password.php">'.get_string('newpassword').'?</a>';
$errors['email'] = get_string('emailexists') . ' ' .
get_string('emailexistssignuphint', 'moodle',
html_writer::link(new moodle_url('/login/forgot_password.php'), get_string('emailexistshintlink')));
}
if (empty($data['email2'])) {
$errors['email2'] = get_string('missingemail');