Esempio n. 1
0
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     //                $this->uid = 1; //测试uid
     $this->loginUser = new PwUserBo($this->uid);
     $this->loginUser->resetGid($this->loginUser->gid);
 }
Esempio n. 2
0
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     $this->checkUserSessionValid();
     $this->loginUser = new PwUserBo($this->uid);
     $this->checkUserSessionValid();
     //统一校验用户是否登录,未登录做跳转
 }
Esempio n. 3
0
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     //		if (!$this->loginUser->isExists()) $this->showError('VOTE:user.not.login');
     //        $this->uid = 1;//测试uid
     $this->loginUser = new PwUserBo($this->uid);
     $this->loginUser->resetGid($this->loginUser->gid);
 }
Esempio n. 4
0
 /**
  * global post: securityKey
  */
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     //        $this->uid = 1;
     $this->checkUserSessionValid();
     //
     $this->userInfo = $this->_getUserAllInfo(PwUser::FETCH_MAIN);
 }
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     //
     $this->loginUser = new PwUserBo($this->uid);
     $this->loginUser->resetGid($this->loginUser->gid);
     //获取版块的logo图片版本号
     $configs = Wekit::C()->getValues('native');
     $this->forums_version = isset($configs['forums.version']) && $configs['forums.version'] ? $configs['forums.version'] : array();
 }
Esempio n. 6
0
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     //                $this->uid = 1; //测试uid
     $this->loginUser = new PwUserBo($this->uid);
     $this->loginUser->resetGid($this->loginUser->gid);
     if (!$this->uid) {
         $this->forwardRedirect(WindUrlHelper::createUrl('u/login/run'));
     }
     $action = $handlerAdapter->getAction();
     $controller = $handlerAdapter->getController();
     $this->setOutput($action, '_action');
     $this->setOutput($controller, '_controller');
 }
Esempio n. 7
0
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     $this->loginUser = new PwUserBo($this->uid);
     $this->loginUser->resetGid($this->loginUser->gid);
     $action = $handlerAdapter->getAction();
     //非法请求
     if (in_array($action, array('fastreply', 'replylist'))) {
         return;
     }
     $this->post = $this->_getPost($action);
     $this->post->user = $this->loginUser;
     if (($result = $this->post->check()) !== true) {
         $error = $result->getError();
         if (is_array($error) && $error[0] == 'BBS:post.forum.allow.ttype' && ($allow = $this->post->forum->getThreadType($this->post->user))) {
             $special = key($allow);
             //
         }
         $this->showError($error);
     }
     /*
            //版块风格
            $pwforum = $this->post->forum;
            if ($pwforum->foruminfo['password']) {
                if (!$this->uid) {
                    $this->forwardAction('u/login/run', array('backurl' => WindUrlHelper::createUrl('bbs/post/' . $action, array('fid' => $$pwforum->fid))));
                } elseif (Pw::getPwdCode($pwforum->foruminfo['password']) != Pw::getCookie('fp_' . $pwforum->fid)) {
                    $this->forwardAction('bbs/forum/password', array('fid' => $pwforum->fid));
                }
            }
            if ($pwforum->foruminfo['style']) {
                $this->setTheme('forum', $pwforum->foruminfo['style']);
            }
     
            $this->setOutput($action, 'action');
     */
 }
Esempio n. 8
0
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     $this->checkUserSessionValid();
 }
Esempio n. 9
0
 /**
  * global post: securityKey
  */
 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
 }