protected function check($r) { $user = Session::isLogged(); $api = Session::isLoggedApi(); if (Session::Has(Session::rights_key)) { $rights = Session::Get(Session::rights_key); } else { $rights = array(); } if ($user || $api) { if (Session::Has(self::userid)) { $userid = Session::Get(self::userid); } else { $userid = false; } if (Session::Has(self::apiid)) { $apiid = Session::Get(self::apiid); } else { $apiid = false; } Output::success(array("user" => $userid, "api" => $apiid, "rights" => $rights, "next" => Session::nextCheck())); } Output::error("Not loggied in"); }
protected function check($r) { Output::success(array("user" => null, "api" => null, "next" => Session::nextCheck())); }