@ -12,6 +12,11 @@ class SessionWrapper
{
session_start();
}
if(!isset($_SESSION[SessionElement::IS_LOGGED_IN->value]))
self::Set(SessionElement::IS_LOGGED_IN, false);
public static function Get(SessionElement $target): mixed
@ -74,7 +74,9 @@ for ($i = 0; $i < count($dances); $i++)
JSON_THROW_ON_ERROR
);
$myVote = 0;
if(SessionWrapper::Get(SessionElement::IS_LOGGED_IN))
$myVote = $db->RunSelect(
queryBuilder: SQLQueryBuilderWrapper::SELECT(
table: 'TuneRatings',
@ -93,6 +95,7 @@ else
$myVote = $myVote[0]['Rating'];
TwigWrapper::RenderTwig(