/** * Overridable function to perform custom post (successful) login checks (allowing * the login to be cancelled). * * Override this function to add custom code. * * @param Zend_Auth $auth The authentication object * @param \Entities\User $user The user logging in * @param string $message A message to be displayed if returning false (cancelling the login) * @param Zend_Form $form Login for to get more information * @return bool False to prevent the user from logging in, else true */ protected function _postLoginChecks($auth, $user, &$message, $form = null) { if ($user->getDisabled()) { $message = "Your account has been disabled. Please contact your administrator."; return false; } return true; }
public function getDisabled() { $this->__load(); return parent::getDisabled(); }