public static function getUid() { if (!isset($_SESSION['email'])) { return false; } $userModel = new userModel(); $ret = $userModel->selectUid($_SESSION['email']); if (!is_object($ret)) { return false; } $retID = $ret->fetch_array()['userId']; if (!$retID) { return false; } return $retID; }