mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/15976] Reset user_passchg only if user changed password
PHPBB3-15976
This commit is contained in:
parent
f6beabc593
commit
11475e5366
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,6 @@ class ucp_profile
|
|||
'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'],
|
||||
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? phpbb_email_hash($data['email']) : $user->data['user_email_hash'],
|
||||
'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? $passwords_manager->hash($data['new_password']) : $user->data['user_password'],
|
||||
'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
|
||||
);
|
||||
|
||||
if ($auth->acl_get('u_chgname') && $config['allow_namechange'] && $data['username'] != $user->data['username'])
|
||||
|
@ -147,6 +146,8 @@ class ucp_profile
|
|||
|
||||
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && !$passwords_manager->check($data['new_password'], $user->data['user_password']))
|
||||
{
|
||||
$sql_ary['user_passchg'] = time();
|
||||
|
||||
$user->reset_login_keys();
|
||||
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_NEW_PASSWORD', false, array(
|
||||
'reportee_id' => $user->data['user_id'],
|
||||
|
|
Loading…
Add table
Reference in a new issue