Page 1 of 1

Disable board for moderators

Posted: 26 Jul 2011, 20:07
by Stoker
Disable board for moderators
Written by Stoker

A little guide howto disable board for moderators.
When you disable your board when updating or installing mods, moderators still have full access to the board.
They will just see a small notice in the header telling that the board is disabled.
This notice is very easy to overslook.

Open includes/session.php
Find:

Code: Select all

// Adjust the message slightly according to the permissions
         if ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))
Replace with:

Code: Select all

// Adjust the message slightly according to the permissions
         if ($auth->acl_gets('a_'))
Find:

Code: Select all

// Is board disabled and user not an admin or moderator?
        if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
Replace with:

Code: Select all

// Is board disabled and user not an admin or moderator?
        if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_'))