- Patch #99027 by greggles and webchick: help users request a new password when registration fails.

5.x
Dries Buytaert 2006-11-22 09:12:05 +00:00
parent 13d538287e
commit 3518d7bdf3
1 changed files with 2 additions and 2 deletions

View File

@ -927,7 +927,7 @@ function user_login_validate($form_id, $form_values) {
$user = user_authenticate($form_values['name'], trim($form_values['pass']));
if (!$user->uid) {
form_set_error('login', t('Sorry, unrecognized username or password.') .' '. l(t('Have you forgotten your password?'), 'user/password'));
form_set_error('login', t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => url('user/password'))));
watchdog('user', t('Login attempt failed for %user.', array('%user' => $form_values['name'])));
}
}
@ -1361,7 +1361,7 @@ function _user_edit_validate($uid, &$edit) {
form_set_error('mail', $error);
}
else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $edit['mail'])));
form_set_error('mail', t('The e-mail address %email is already registered. <a href="@password">Have you forgotten your password?</a>', array('%email' => $edit['mail'], '@password' => url('user/password'))));
}
else if (drupal_is_denied('mail', $edit['mail'])) {
form_set_error('mail', t('The e-mail address %email has been denied access.', array('%email' => $edit['mail'])));