set the session cache for auth_alpwchange_val on setLastPwdChange

This commit is contained in:
Klaus Leithoff 2011-09-23 09:29:59 +00:00
parent c622957b40
commit b860d7fb50
2 changed files with 4 additions and 2 deletions

View File

@ -245,6 +245,7 @@ class auth_ldap implements auth_backend
{
return false;
}
egw_cache::setSession('phpgwapi','auth_alpwchange_val',$entry['shadowlastchange']);
return true;
}

View File

@ -176,14 +176,15 @@ class auth_sql implements auth_backend
{
return false;
}
$lastpwdchange = (is_null($lastpwdchange) || $lastpwdchange<0 ? time():$lastpwdchange);
$this->db->update($this->table,array(
'account_lastpwd_change' => (is_null($lastpwdchange) || $lastpwdchange<0 ? time():$lastpwdchange),
'account_lastpwd_change' => $lastpwdchange,
),array(
'account_id' => $account_id,
),__LINE__,__FILE__);
if(!$this->db->affected_rows()) return false;
egw_cache::setSession('phpgwapi','auth_alpwchange_val',$lastpwdchange);
return true;
}