diff --git a/phpgwapi/inc/class.auth_ldap.inc.php b/phpgwapi/inc/class.auth_ldap.inc.php index d351e97abb..e9117e9511 100644 --- a/phpgwapi/inc/class.auth_ldap.inc.php +++ b/phpgwapi/inc/class.auth_ldap.inc.php @@ -245,6 +245,7 @@ class auth_ldap implements auth_backend { return false; } + egw_cache::setSession('phpgwapi','auth_alpwchange_val',$entry['shadowlastchange']); return true; } diff --git a/phpgwapi/inc/class.auth_sql.inc.php b/phpgwapi/inc/class.auth_sql.inc.php index 35cae43498..20ffa045b0 100644 --- a/phpgwapi/inc/class.auth_sql.inc.php +++ b/phpgwapi/inc/class.auth_sql.inc.php @@ -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; }