public function _initialize()
 {
     parent::_initialize();
     if (!is_admin_login()) {
         $this->error('你没有权限登录', C('UC_LOGIN_URL'));
         exit;
     }
 }
Example #2
0
 public function _initialize()
 {
     parent::_initialize();
     //echo 'index';exit;
     //dump($_SESSION);exit;
     if (is_admin_login()) {
         redirect('/Home/AdminPage/index?access_token=' . $_GET['access_token']);
     } elseif (is_staff_login()) {
         redirect('/Home/StaffPage/index?access_token=' . $_GET['access_token']);
     }
 }