Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 /**
  * 初始化用户会话信息
  */
 protected function initSession()
 {
     //初始化用户信息
     $filter = new MUserFilter();
     $filter->oauth2Judge();
 }