public function invoke() { $filter = new MUserFilter(); $filter->oauth2Judge(); //check user auth $user = MUserManager::getInstance()->getCurrentUser(); $userId = $user["id"]; $user = MiniUser::getInstance()->getUser($userId); if ($user["is_admin"] !== true) { throw new MiniException(1200); } parent::invoke(); }
/** * 初始化用户会话信息 */ protected function initSession() { //初始化用户信息 $filter = new MUserFilter(); $filter->oauth2Judge(); }