Moved functions into classes

This commit is contained in:
Michał Gdula 2022-09-12 14:15:16 +00:00
parent 951871b983
commit 92a1c3500e
22 changed files with 224 additions and 234 deletions

View file

@ -11,8 +11,12 @@
include "ui/required.php";
include "ui/nav.php";
use App\Account;
$user_info = new Account();
// Check if the user is logged in, otherwise redirect to login page
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
if ($user_info->is_loggedin() != true) {
header("location: account.php");
exit;
}