set the session cache for auth_alpwchange_val in methods for changepassword too

This commit is contained in:
Klaus Leithoff 2011-09-23 09:56:12 +00:00
parent 6bff18eadd
commit ac22466ba0
2 changed files with 6 additions and 1 deletions

View File

@ -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'];
}

View File

@ -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;