summaryrefslogtreecommitdiff
path: root/modules/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-14 15:15:19 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-14 15:15:19 +0000
commita6e7e9c104f718a98c92770a1d606b3531b54e3d (patch)
treecba50af88f6194e786c202a49e47905f8f749b2f /modules/user.module
parentbf3c137097f4331fd456853898e06d86acfb0d9d (diff)
downloadbrdo-a6e7e9c104f718a98c92770a1d606b3531b54e3d.tar.gz
brdo-a6e7e9c104f718a98c92770a1d606b3531b54e3d.tar.bz2
- Patch #15566 by drumm: must specify a userneme or password error happens when it shouldn't.
Diffstat (limited to 'modules/user.module')
-rw-r--r--modules/user.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/user.module b/modules/user.module
index d20881dd6..3807c070f 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -914,9 +914,6 @@ function user_pass() {
else if ($edit['mail'] && !($account = user_load(array('mail' => $edit['mail'], 'status' => 1)))) {
form_set_error('mail', t('Sorry. The e-mail address %email is not recognized.', array('%email' => '<em>'. $edit['mail'] .'</em>')));
}
- else if ($edit) {
- drupal_set_message(t('You must provider either a username or e-mail address.'), 'error');
- }
if ($account) {
$from = variable_get('site_mail', ini_get('sendmail_from'));
$pass = user_password();
@@ -942,6 +939,9 @@ function user_pass() {
drupal_goto('user');
}
else {
+ if ($edit) {
+ drupal_set_message(t('You must provider either a username or e-mail address.'), 'error');
+ }
// Display form:
$output = '<p>'. t('Enter your username <strong><em>or</em></strong> your e-mail address.') .'</p>';
$output .= form_textfield(t('Username'), 'name', $edit['name'], 30, 64);