allow old name for account_lastpwd_change (account_lastpassword_change)

This commit is contained in:
Klaus Leithoff 2010-09-22 11:41:58 +00:00
parent d3e84ea86a
commit 96c1ac80c7

View File

@ -71,11 +71,17 @@ class auth
//echo $GLOBALS['egw_info']['user']['account_lastpwd_change'].'<br>'; //echo $GLOBALS['egw_info']['user']['account_lastpwd_change'].'<br>';
//echo ($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400).'<br>'; //echo ($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400).'<br>';
//echo egw_time::to('now','ts')-($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400).'<br>'; //echo egw_time::to('now','ts')-($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400).'<br>';
$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') && if (!($app == 'preferences' && $class == 'uipassword' && $method=='change') &&
(($GLOBALS['egw_info']['server']['change_pwd_every_x_days'] && (($GLOBALS['egw_info']['server']['change_pwd_every_x_days'] &&
($GLOBALS['egw_info']['user']['apps']['preferences'] || $GLOBALS['egw_info']['user']['apps']['password']) && ($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'] egw_time::to('now','ts')-($GLOBALS['egw_info']['server']['change_pwd_every_x_days']*86400)>$GLOBALS['egw_info']['user'][$alpwchange]
) || $GLOBALS['egw_info']['user']['account_lastpwd_change']==0) ) || $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( error_log(__METHOD__.' Password of '.$GLOBALS['egw_info']['user']['account_lid'].' ('.$GLOBALS['egw_info']['user']['account_fullname'].') is of old age.'.array2string(array(