do not force password change if in substitute user mode

This commit is contained in:
Uwe Steinmann 2023-03-29 20:48:07 +02:00
parent 0280a8adc0
commit 382e78855d
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@
- color category (use first 6 chars of md5(category name) as hex color)
- create missing preview images in category or attribute manager
- support README of extension in different languages
- do not force password change if in substitute user mode
--------------------------------------------------------------------------------
Changes in version 5.1.29

View File

@ -103,11 +103,11 @@ if(file_exists($settings->_rootDir . "view/".$theme."/languages/" . $lang . "/la
/* Check if password needs to be changed because it expired. If it needs
* to be changed redirect to out/out.ForcePasswordChange.php. Do this
* check only if password expiration is turned on, we are not on the
* page to change the password or the page that changes the password, and
* it is not admin */
* page to change the password or the page that changes the password,
* it is not admin, and there is currently no user substitution */
if (!$user->isAdmin()) {
if($settings->_passwordExpiration > 0) {
if(!$resArr['su'] && $settings->_passwordExpiration > 0) {
if(basename($_SERVER['SCRIPT_NAME']) != 'out.ForcePasswordChange.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.EditUserData.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.Logout.php') {
$pwdexp = $user->getPwdExpiration();
if(substr($pwdexp, 0, 10) != '0000-00-00') {