mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 11:19:55 +03:00
fixes #1275 delete password reset key when email address is changed
This commit is contained in:
parent
498fb5e85d
commit
7d7943b3ed
4 changed files with 30 additions and 9 deletions
|
@ -1629,6 +1629,25 @@ UPDATE '.USER_AUTH_KEYS_TABLE.'
|
|||
pwg_query($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deactivates password reset key
|
||||
*
|
||||
* @since 11
|
||||
* @param int $user_id
|
||||
* @return null
|
||||
*/
|
||||
function deactivate_password_reset_key($user_id)
|
||||
{
|
||||
single_update(
|
||||
USER_INFOS_TABLE,
|
||||
array(
|
||||
'activation_key' => null,
|
||||
'activation_key_expire' => null,
|
||||
),
|
||||
array('user_id' => $user_id)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last visit (datetime) of a user, based on history table
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue