aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_profile.php
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2019-05-27 15:40:55 +0200
committerJakub Senko <jakubsenko@gmail.com>2019-05-27 15:40:55 +0200
commit11475e5366b26cddac9a5a5306edf6c17c39f763 (patch)
tree7726b2154d8dccc2c9c67251a9760d1115d05007 /phpBB/includes/ucp/ucp_profile.php
parentf6beabc59354a7b872039403574f8ceb44b6d325 (diff)
downloadforums-11475e5366b26cddac9a5a5306edf6c17c39f763.tar
forums-11475e5366b26cddac9a5a5306edf6c17c39f763.tar.gz
forums-11475e5366b26cddac9a5a5306edf6c17c39f763.tar.bz2
forums-11475e5366b26cddac9a5a5306edf6c17c39f763.tar.xz
forums-11475e5366b26cddac9a5a5306edf6c17c39f763.zip
[ticket/15976] Reset user_passchg only if user changed password
PHPBB3-15976
Diffstat (limited to 'phpBB/includes/ucp/ucp_profile.php')
-rw-r--r--phpBB/includes/ucp/ucp_profile.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 9a1284083f..36ab3d0463 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -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'],