summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-10-12 18:19:34 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-10-12 18:19:34 -0400
commit21932a5f8a7ea90cd9251b9db7196b495c6842c3 (patch)
treece31d5b8b1a9a8af3e0566efc0ddbf4fbde7236f /modules
parent6e6c3dba67cda8b218befae00422d361b3990942 (diff)
downloadbrdo-21932a5f8a7ea90cd9251b9db7196b495c6842c3.tar.gz
brdo-21932a5f8a7ea90cd9251b9db7196b495c6842c3.tar.bz2
Issue #2477641 by opdavies, markpavlitski, pguillard, sivaji@knackforge.com, kaypro4, gyuhyon, edutrul, yoroy: One-time login link failure messages are misleading because they are not marked as errors
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.pages.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index f21bd134d..2d3c13d00 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -105,10 +105,10 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a
$reset_link_account = user_load($uid);
if (!empty($reset_link_account)) {
drupal_set_message(t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please <a href="!logout">logout</a> and try using the link again.',
- array('%other_user' => $user->name, '%resetting_user' => $reset_link_account->name, '!logout' => url('user/logout'))));
+ array('%other_user' => $user->name, '%resetting_user' => $reset_link_account->name, '!logout' => url('user/logout'))), 'warning');
} else {
// Invalid one-time link specifies an unknown user.
- drupal_set_message(t('The one-time login link you clicked is invalid.'));
+ drupal_set_message(t('The one-time login link you clicked is invalid.'), 'error');
}
}
drupal_goto();
@@ -123,7 +123,7 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a
if ($timestamp <= $current && $account = reset($users)) {
// No time out for first time login.
if ($account->login && $current - $timestamp > $timeout) {
- drupal_set_message(t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.'));
+ drupal_set_message(t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.'), 'error');
drupal_goto('user/password');
}
elseif ($account->uid && $timestamp >= $account->login && $timestamp <= $current && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid)) {
@@ -151,7 +151,7 @@ function user_pass_reset($form, &$form_state, $uid, $timestamp, $hashed_pass, $a
}
}
else {
- drupal_set_message(t('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.'));
+ drupal_set_message(t('You have tried to use a one-time login link that has either been used or is no longer valid. Please request a new one using the form below.'), 'error');
drupal_goto('user/password');
}
}
@@ -533,7 +533,7 @@ function user_cancel_confirm($account, $timestamp = 0, $hashed_pass = '') {
batch_process('');
}
else {
- drupal_set_message(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'));
+ drupal_set_message(t('You have tried to use an account cancellation link that has expired. Please request a new one using the form below.'), 'error');
drupal_goto("user/$account->uid/cancel");
}
}