/** * @brief 复写BaseAction的actionStartUpFinish()方法,执行userInfoHook() * * @see BaseAction:actionStartUpFinish() * @note Saf_Base_Hook兼容老SAF的Hook使用方式 * @author chenyijie * @date 2012/10/16 17:20:53 **/ public function actionStartUpFinish() { //兼容老版SAF的Hook使用方式 Saf_Base_Hook::userInfoHook(); //执行用户自定义Hook if (is_object($this->objHook)) { $this->objHook->hookStartUpTail(); } //关闭字典写权限 parent::$arrDict[parent::USER_INFO]['status'] = parent::DICT_READ; }
public static function checkSession() { if (!self::$arrCommonAction['session']) { //是否被裁剪 return true; } //都是为了速度统计 $timer = null; if (class_exists('Ap_Registry')) { $timer = Ap_Registry::get('timer'); if (is_object($timer)) { $timer->stop('processTime'); $timer->start('requestTime'); } else { $timer = null; } } $arrUserInfo = Saf_Base_Session::checkLogin(); if ($timer) { $timer->start('processTime'); $timer->stop('requestTime'); } if ($arrUserInfo === false) { return false; } //开放写权限 self::$arrDict[self::USER_INFO]['status'] = self::DICT_WRITE; $re = self::setUserInfo($arrUserInfo); Saf_Base_Hook::userInfoHook(); //关闭写权限 self::$arrDict[self::USER_INFO]['status'] = self::DICT_READ; }