mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
User/Misc
* floating changes * codify user checks into functions
This commit is contained in:
@@ -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'] ?? '');
|
||||
|
||||
Reference in New Issue
Block a user