Update index and create is_connected

This commit is contained in:
osaajani 2019-11-11 00:22:40 +01:00
parent 32ef6b7c90
commit a99e159b1f
5 changed files with 11 additions and 420 deletions

View file

@ -152,6 +152,16 @@ namespace controllers\internals;
}
}
/**
* Check if the user connected.
*
* @return bool : True if connected, False else
*/
public static function is_connected()
{
return (bool) ($_SESSION['connect'] ?? false);
}
/**
* Check if the user is admin.
*