1
0
mirror of https://github.com/EGroupware/egroupware.git synced 2025-07-11 03:45:15 +02:00

if ldap with fallback sql, we may be able to fetch and set the password last change date, if we are on primary, so check if the method exists instead of returning false.

This commit is contained in:
Klaus Leithoff
2011-09-26 15:20:40 +00:00
parent 740758d026
commit db3f408f18

@ -103,7 +103,7 @@ class auth_fallback implements auth_backend
{ {
if (egw_cache::getInstance(__CLASS__,'backend_used-'.$username) == 'primary') if (egw_cache::getInstance(__CLASS__,'backend_used-'.$username) == 'primary')
{ {
return false; if (method_exists($this->primary_backend,'getLastPwdChange')) return $this->primary_backend->getLastPwdChange($username);
} }
if (method_exists($this->fallback_backend,'getLastPwdChange')) return $this->fallback_backend->getLastPwdChange($username); if (method_exists($this->fallback_backend,'getLastPwdChange')) return $this->fallback_backend->getLastPwdChange($username);
return false; return false;
@ -131,7 +131,7 @@ class auth_fallback implements auth_backend
} }
if (egw_cache::getInstance(__CLASS__,'backend_used-'.$username) == 'primary') if (egw_cache::getInstance(__CLASS__,'backend_used-'.$username) == 'primary')
{ {
return false; if (method_exists($this->primary_backend,'setLastPwdChange')) return $this->primary_backend->setLastPwdChange($username);
} }
if (method_exists($this->fallback_backend,'setLastPwdChange')) return $this->fallback_backend->setLastPwdChange($account_id, $passwd, $lastpwdchange); if (method_exists($this->fallback_backend,'setLastPwdChange')) return $this->fallback_backend->setLastPwdChange($account_id, $passwd, $lastpwdchange);
return false; return false;