static function is_logined() { if (PtLib\is_cli()) { return true; } $cookie_auth_key = self::get_cookie_auth_key(); $logined = false; if (!isset($_COOKIE[$cookie_auth_key])) { return $logined; } $auth_info = PtLib\secure_cookie_decode($cookie_auth_key, $_COOKIE[$cookie_auth_key]); if ($auth_info) { $auth_info = json_decode($auth_info, true); } if ($auth_info && !empty($auth_info['uid'])) { PtApp::$auth = $auth_info; $logined = True; } else { $logined = false; } return $logined; }