Fixed admin panel user registration.

Now including start.sh to start a php server using the router.php so no webserver is needed.
This commit is contained in:
2025-12-03 08:10:38 +01:00
parent 3a99bd6683
commit 1a30c45d62
9 changed files with 49 additions and 94 deletions

View File

@@ -379,15 +379,4 @@ class LoginModel
{
return Session::userIsLoggedIn();
}
/**
* Check if the logged-in user is an admin
*
* @return bool True if the user is an admin, false otherwise
*/
public static function isAdmin()
{
$user_role = Session::get('user_role'); // Assuming user role is stored in session
return $user_role === 'admin';
}
}