public static function logout() { $time = time() - 1000; Utils\Cookie::set("uid", "", $time); Utils\Cookie::set("email", "", $time); Utils\Cookie::set("key", "", $time); }
public function getUser() { $sid = Cookie::get('sid'); $value = $this->client->get($sid); if ($value == null) { $user = new User(); $user->isLogin = false; return $user; } $uid = $value; $user = User::find($uid); if ($user == null) { $user->isLogin = false; return $user; } $user->isLogin = true; return $user; }
public static function logout() { $sid = Cookie::get('sid'); self::getCache()->del($sid); }
public static function logout() { $time = time() - 1000; Utils\Cookie::set(["uid" => null, "email" => null, "key" => null], $time); }
public function getUser() { $token = Utils\Cookie::get('token'); $tokenInfo = Jwt::decodeArray($token); }