forked from extern/egroupware
set the session cache for auth_alpwchange_val in methods for changepassword too
This commit is contained in:
parent
6bff18eadd
commit
ac22466ba0
@ -282,7 +282,10 @@ class auth_ldap implements auth_backend
|
||||
$allValues = ldap_get_entries($ds, $sri);
|
||||
|
||||
$entry['userpassword'] = auth::encrypt_password($new_passwd);
|
||||
if ($update_lastchange) $entry['shadowlastchange'] = round((time()-date('Z')) / (24*3600));
|
||||
if ($update_lastchange)
|
||||
{
|
||||
$entry['shadowlastchange'] = round((time()-date('Z')) / (24*3600));
|
||||
}
|
||||
|
||||
$dn = $allValues[0]['dn'];
|
||||
|
||||
@ -297,6 +300,7 @@ class auth_ldap implements auth_backend
|
||||
if($old_passwd) // if old password given (not called by admin) update the password in the session
|
||||
{
|
||||
$GLOBALS['egw']->session->appsession('password','phpgwapi',$new_passwd);
|
||||
egw_cache::setSession('phpgwapi','auth_alpwchange_val',$entry['shadowlastchange']);
|
||||
}
|
||||
return $entry['userpassword'];
|
||||
}
|
||||
|
@ -252,6 +252,7 @@ class auth_sql implements auth_backend
|
||||
|
||||
if(!$admin)
|
||||
{
|
||||
egw_cache::setSession('phpgwapi','auth_alpwchange_val',$update['account_lastpwd_change']);
|
||||
$GLOBALS['egw']->session->appsession('password','phpgwapi',$new_passwd);
|
||||
}
|
||||
return $encrypted_passwd;
|
||||
|
Loading…
Reference in New Issue
Block a user