Beispiel #1
0
 public function login($post)
 {
     $param = array();
     $param['username'] = Ini::gSt('LOCAL_UID');
     $param['rememberMe'] = true;
     $model = new formLogin();
     if (Ini::userLevel($param['username'])) {
         $model->attributes = $param;
         if ($model->validate() && $model->login()) {
             $this->renderJSON(array('x' => 'http://admin.' . HOST . '/admin/default/'), true);
         }
     }
     $this->renderJSON(array('errs' => array('Sorry, you don\'t have permission to access admin')), false);
 }