User/Misc

* floating changes
 * codify user checks into functions
This commit is contained in:
Sarjuuk
2025-04-02 22:27:05 +02:00
parent 3078763ec3
commit 682b315e17
22 changed files with 78 additions and 71 deletions

View File

@@ -329,13 +329,13 @@ class GenericPage
}
// requires authed user
if ($this->reqAuth && !User::$id)
if ($this->reqAuth && !User::isLoggedIn())
$this->forwardToSignIn($_SERVER['QUERY_STRING'] ?? '');
// restricted access
if ($this->reqUGroup && !User::isInGroup($this->reqUGroup))
{
if (User::$id)
if (User::isLoggedIn())
$this->error();
else
$this->forwardToSignIn($_SERVER['QUERY_STRING'] ?? '');