'Application_User_')); protected $_loginPageQuery = array(null, array('type' => 'Application_Reviewer_Login_')); public static function getInstance() { if (null === self::$_instance) { self::$_instance = new self(); } return self::$_instance; } public function getSuMode() { return (bool) $this->getSessionValue('suModeEnabled'); } public function setSuMode($flag = true) { $this->setSessionValue('suModeEnabled', (bool)$flag); } public function allowLogin() { if ('y' == App_Settings_Obj::get('applicationEnableReviewers')) { return true; } return false; } public function authenticate(Zend_Auth_Adapter_Interface $adapter) { if (!$this->allowLogin()) { App_Application_Reviewer_Logout_View::clearIdentity(); return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, $adapter->getIdentity(), array('Sorry, You Are Not Allowed to Access Application Portal')); } $isStorageEmpty = !$this->getStorage()->read(); /** @var Zend_Auth_Result $result */ $result = parent::authenticate($adapter); if (!$result->isValid() || $isStorageEmpty) { App_Application_Document_AdminView::refreshDocumentsAccessFile(); } return $result; } }