From db3f408f18dc6561e4a633d19a8b4e8ca132728c Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 26 Sep 2011 15:20:40 +0000 Subject: [PATCH] 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. --- phpgwapi/inc/class.auth_fallback.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.auth_fallback.inc.php b/phpgwapi/inc/class.auth_fallback.inc.php index a3d2d1d002..b0e4243884 100644 --- a/phpgwapi/inc/class.auth_fallback.inc.php +++ b/phpgwapi/inc/class.auth_fallback.inc.php @@ -103,7 +103,7 @@ class auth_fallback implements auth_backend { 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); return false; @@ -131,7 +131,7 @@ class auth_fallback implements auth_backend } 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); return false;