예제 #1
0
 public static function init()
 {
     ini_set('session.use_strict_mode', true);
     ini_set('session.use_only_cookies', true);
     session_start();
     if (self::get('user_id')) {
         User::checkUser();
     }
 }
예제 #2
0
 public function login()
 {
     $user = $this->checkCreds();
     if ($user) {
         $this->user = $user;
         $this->auth($this->user['id']);
         if (User::checkUser()) {
             if (!empty($this->remember) && $this->remember > 0) {
                 $this->setRememberCookie($this->user['id']);
             }
             return $this->user['id'];
         }
     }
     return FALSE;
 }
예제 #3
0
 public function checkUserAction()
 {
     header('Content-type: text/plain; charset=utf-8');
     header('Cache-Control: no-store, no-cache');
     header('Expires: ' . date('r'));
     echo User::checkUser();
 }