'Application_Document_'), array('userType' => App_Application_Document_Obj::USER_TYPE_APPLICANT)); protected $_loginPageQuery = array(null, array('type' => 'Application_User_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('applicationEnableApplicants') && date('Y-m-d') <= App_Settings_Obj::get('applicationDeadlineDate') ) { return true; } return false; } public function authenticate(Zend_Auth_Adapter_Interface $adapter) { if (!$this->allowLogin()) { App_Application_User_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(); $result = parent::authenticate($adapter); if (!$result->isValid() || $isStorageEmpty) { App_Application_Document_AdminView::refreshDocumentsAccessFile(); } return $result; } }