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(); } }
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; }
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(); }