diff --git a/phpgwapi/inc/class.auth.inc.php b/phpgwapi/inc/class.auth.inc.php index 39cab5d3f4..6ab8321f0d 100644 --- a/phpgwapi/inc/class.auth.inc.php +++ b/phpgwapi/inc/class.auth.inc.php @@ -71,11 +71,17 @@ class auth //echo $GLOBALS['egw_info']['user']['account_lastpwd_change'].'
'; //echo ($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400).'
'; //echo egw_time::to('now','ts')-($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400).'
'; + $alpwchange='account_lastpwd_change'; + if ($GLOBALS['egw_info']['user']['account_lastpasswd_change'] && !$GLOBALS['egw_info']['user'][$alpwchange]) + { + // old style names + $alpwchange='account_lastpasswd_change'; + } if (!($app == 'preferences' && $class == 'uipassword' && $method=='change') && (($GLOBALS['egw_info']['server']['change_pwd_every_x_days'] && ($GLOBALS['egw_info']['user']['apps']['preferences'] || $GLOBALS['egw_info']['user']['apps']['password']) && - egw_time::to('now','ts')-($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400)>$GLOBALS['egw_info']['user']['account_lastpwd_change'] - ) || $GLOBALS['egw_info']['user']['account_lastpwd_change']==0) + egw_time::to('now','ts')-($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400)>$GLOBALS['egw_info']['user'][$alpwchange] + ) || $GLOBALS['egw_info']['user'][$alpwchange]==0) ) { error_log(__METHOD__.' Password of '.$GLOBALS['egw_info']['user']['account_lid'].' ('.$GLOBALS['egw_info']['user']['account_fullname'].') is of old age.'.array2string(array(