check if method exists for the fallback_auth, before calling get/setLastPwdChange

This commit is contained in:
Klaus Leithoff 2011-09-26 11:01:16 +00:00
parent 7443fdc639
commit 740758d026
2 changed files with 8 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}