mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
fixing ACL check for nopasswordchange; fixing setting of shadowlastchange by using the correct data with propper format
This commit is contained in:
parent
2b4eddc56b
commit
2e33eeaab6
@ -590,8 +590,8 @@ class accounts_ldap
|
||||
{
|
||||
unset($to_write['shadowexpire']); // gives protocoll error otherwise
|
||||
}
|
||||
|
||||
if ($data['account_lastpwd_change']) $to_write['shadowlastchange'] = $data['lastpwd_change']/(24*3600);
|
||||
//error_log(__METHOD__.__LINE__.$data['account_lid'].'#'.$data['account_lastpwd_change'].'#');
|
||||
if ($data['account_lastpwd_change']) $to_write['shadowlastchange'] = round(($data['account_lastpwd_change']-$utc_diff)/(24*3600));
|
||||
if (isset($data['account_lastpwd_change']) && $data['account_lastpwd_change']==0) $to_write['shadowLastChange'] = 0;
|
||||
// lastlogin and lastlogin from are not availible via the shadowAccount object class
|
||||
// $to_write['phpgwaccountlastlogin'] = $data['lastlogin'];
|
||||
|
@ -89,7 +89,7 @@ class auth
|
||||
) || $GLOBALS['egw_info']['user'][$alpwchange]==0)
|
||||
)
|
||||
{
|
||||
if ($GLOBALS['egw']->acl->check('nopasswordchange', 1)) return true; // user has no rights to change password
|
||||
if ($GLOBALS['egw']->acl->check('nopasswordchange', 1, 'preferences')) return true; // user has no rights to change password
|
||||
error_log(__METHOD__.' Password of '.$GLOBALS['egw_info']['user']['account_lid'].' ('.$GLOBALS['egw_info']['user']['account_fullname'].') is of old age.'.array2string(array(
|
||||
'ts'=>$GLOBALS['egw_info']['user']['account_lastpwd_change'],
|
||||
'date'=>egw_time::to($GLOBALS['egw_info']['user']['account_lastpwd_change']))));
|
||||
|
Loading…
Reference in New Issue
Block a user