Révision 5587145e
Ajouté par Assos Assos il y a presque 7 ans
drupal7/modules/user/user.module | ||
---|---|---|
1088 | 1088 |
'#description' => t('To change the current user password, enter the new password in both fields.'), |
1089 | 1089 |
); |
1090 | 1090 |
// To skip the current password field, the user must have logged in via a |
1091 |
// one-time link and have the token in the URL. |
|
1092 |
$pass_reset = isset($_SESSION['pass_reset_' . $account->uid]) && isset($_GET['pass-reset-token']) && ($_GET['pass-reset-token'] == $_SESSION['pass_reset_' . $account->uid]); |
|
1091 |
// one-time link and have the token in the URL. Store this in $form_state |
|
1092 |
// so it persists even on subsequent Ajax requests. |
|
1093 |
if (!isset($form_state['user_pass_reset'])) { |
|
1094 |
$form_state['user_pass_reset'] = isset($_SESSION['pass_reset_' . $account->uid]) && isset($_GET['pass-reset-token']) && ($_GET['pass-reset-token'] == $_SESSION['pass_reset_' . $account->uid]); |
|
1095 |
} |
|
1093 | 1096 |
$protected_values = array(); |
1094 | 1097 |
$current_pass_description = ''; |
1095 | 1098 |
// The user may only change their own password without their current |
1096 | 1099 |
// password if they logged in via a one-time login link. |
1097 |
if (!$pass_reset) {
|
|
1100 |
if (!$form_state['user_pass_reset']) {
|
|
1098 | 1101 |
$protected_values['mail'] = $form['account']['mail']['#title']; |
1099 | 1102 |
$protected_values['pass'] = t('Password'); |
1100 | 1103 |
$request_new = l(t('Request new password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.')))); |
Formats disponibles : Unified diff
Update to 7.56