Added new banning system.
it actually works and isn't confusing this time around!
This commit is contained in:
parent
42560a62e6
commit
60cc6643a0
38 changed files with 1132 additions and 358 deletions
public
|
@ -143,14 +143,16 @@ CSRF::init(
|
|||
(UserSession::hasCurrent() ? UserSession::getCurrent()->getToken() : ($_SERVER['REMOTE_ADDR'] ?? '::1'))
|
||||
);
|
||||
|
||||
if(!empty($userInfo))
|
||||
if(!empty($userInfo)) {
|
||||
Template::set('current_user', $userInfo);
|
||||
Template::set('current_user_ban_info', $msz->tryGetActiveBan());
|
||||
}
|
||||
if(!empty($userInfoReal))
|
||||
Template::set('current_user_real', $userInfoReal);
|
||||
|
||||
$inManageMode = str_starts_with($_SERVER['REQUEST_URI'], '/manage');
|
||||
$hasManageAccess = User::hasCurrent()
|
||||
&& !User::getCurrent()->hasActiveWarning()
|
||||
&& !$msz->hasActiveBan()
|
||||
&& perms_check_user(MSZ_PERMS_GENERAL, User::getCurrent()->getId(), MSZ_PERM_GENERAL_CAN_MANAGE);
|
||||
Template::set('has_manage_access', $hasManageAccess);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue