static function checkAuth() { if (!APISecurity::isLogged()) { APIHelpers::showerror(1224, 'Not authorized request'); exit; } }
static function userid() { $userid = 0; if (APIHelpers::$FHQSESSION != NULL && APISecurity::isLogged() && isset(APIHelpers::$FHQSESSION['user']['id'])) { $userid = intval(APIHelpers::$FHQSESSION['user']['id']); } else { $userid = APISecurity::isLogged() && isset($_SESSION['user']['id']) ? $_SESSION['user']['id'] : intval(''); } if (intval($userid) == 0) { session_destroy(); APIHelpers::showerror(1317, 'Please relogon'); } return $userid; }