From 740758d026eef2af0ef81800c2c0868170b5ddd9 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 26 Sep 2011 11:01:16 +0000 Subject: [PATCH] check if method exists for the fallback_auth, before calling get/setLastPwdChange --- phpgwapi/inc/class.auth_fallback.inc.php | 6 ++++-- phpgwapi/inc/class.auth_fallbackmail2sql.inc.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.auth_fallback.inc.php b/phpgwapi/inc/class.auth_fallback.inc.php index 935d534844..a3d2d1d002 100644 --- a/phpgwapi/inc/class.auth_fallback.inc.php +++ b/phpgwapi/inc/class.auth_fallback.inc.php @@ -105,7 +105,8 @@ class auth_fallback implements auth_backend { return false; } - return $this->fallback_backend->getLastPwdChange($username); + if (method_exists($this->fallback_backend,'getLastPwdChange')) return $this->fallback_backend->getLastPwdChange($username); + return false; } /** @@ -132,6 +133,7 @@ class auth_fallback implements auth_backend { return false; } - 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; } } diff --git a/phpgwapi/inc/class.auth_fallbackmail2sql.inc.php b/phpgwapi/inc/class.auth_fallbackmail2sql.inc.php index f812599349..9cdfcc1f81 100644 --- a/phpgwapi/inc/class.auth_fallbackmail2sql.inc.php +++ b/phpgwapi/inc/class.auth_fallbackmail2sql.inc.php @@ -105,7 +105,8 @@ class auth_fallbackmail2sql implements auth_backend { return false; } - return $this->fallback_backend->getLastPwdChange($username); + if (method_exists($this->fallback_backend,'getLastPwdChange')) return $this->fallback_backend->getLastPwdChange($username); + return false; } /** @@ -132,6 +133,7 @@ class auth_fallbackmail2sql implements auth_backend { return false; } - 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; } }