Update Drupal 7 dependencies

This commit is contained in:
Mauricio Dinarte 2025-06-03 10:37:00 -06:00 committed by Janez Urevc
parent 7d902ba1ef
commit 13df912654
391 changed files with 2900 additions and 1502 deletions

View file

@ -1283,7 +1283,12 @@ function user_account_form_validate($form, &$form_state) {
elseif ((bool) db_select('users')->fields('users', array('uid'))->condition('uid', $account->uid, '<>')->condition('mail', db_like($form_state['values']['mail']), 'LIKE')->range(0, 1)->execute()->fetchField()) {
// Format error message dependent on whether the user is logged in or not.
if ($GLOBALS['user']->uid) {
form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $form_state['values']['mail'])));
// Do not fail the validation if user has not changed e-mail address.
// This means that multiple accounts with the same e-mail address exist
// and the logged-in user is one of them.
if ((isset($account->mail) && $account->mail != $mail) || !isset($account->mail)) {
form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $form_state['values']['mail'])));
}
}
else {
form_set_error('mail', t('The e-mail address %email is already registered. <a href="@password">Have you forgotten your password?</a>', array('%email' => $form_state['values']['mail'], '@password' => url('user/password'))));
@ -2312,12 +2317,12 @@ function user_authenticate($name, $password) {
* The function records a watchdog message about the new session, saves the
* login timestamp, calls hook_user_login(), and generates a new session.
*
* @param array $edit
* The array of form values submitted by the user.
* @param array $form_state
* A keyed array containing the current state of the login form.
*
* @see hook_user_login()
*/
function user_login_finalize(&$edit = array()) {
function user_login_finalize(&$form_state = array()) {
global $user;
watchdog('user', 'Session opened for %name.', array('%name' => $user->name));
// Update the user table timestamp noting user has logged in.
@ -2329,11 +2334,12 @@ function user_login_finalize(&$edit = array()) {
->execute();
// Regenerate the session ID to prevent against session fixation attacks.
// This is called before hook_user in case one of those functions fails
// or incorrectly does a redirect which would leave the old session in place.
// This is called before hook_user_login() in case one of those functions
// fails or incorrectly does a redirect which would leave the old session in
// place.
drupal_session_regenerate();
user_module_invoke('login', $edit, $user);
user_module_invoke('login', $form_state, $user);
}
/**