From 96c1ac80c76863ff7d5c7d6cca3eefa2d1397d82 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 22 Sep 2010 11:41:58 +0000 Subject: [PATCH] allow old name for account_lastpwd_change (account_lastpassword_change) --- phpgwapi/inc/class.auth.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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(