Description:
This mod allows only super adminstrator to add a new admin or modifying an existing user to become admin.
This mod is useful for forums that have more than one admin or user groups that have access to admin cp and you don't want normal admin to add new admin or modify/promote a user to an admin group (or any group you assigned).
Installation time: 1-2 mins (easy)
File mod: 1
1 new phrase
Note:
- change value 1 in $superadmin to your own userid.
- if you have more than 1 super admin, you can use array to do the trick.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I added my user id into the $superadmin variable, but it still gives me the no permission message. Is that supposed to happen?
if you'r the only super admin, you can use this code instead
Code:
// only super admin can add admin (and/or smod)
$cant_add_groups = array(5,6); // use comma to seperate usergroups
if (($bbuserinfo['userid'] != '1') AND in_array($user['usergroupid'], $cant_add_groups))
{
print_stop_message('cant_add_admin');
}
if you'r the only super admin, you can use this code instead
Code:
// only super admin can add admin (and/or smod)
$cant_add_groups = array(5,6); // use comma to seperate usergroups
if (($bbuserinfo['userid'] != '1') AND in_array($user['usergroupid'], $cant_add_groups))
{
print_stop_message('cant_add_admin');
}
and I assumed your userid is 1 .
Actually no, there are 2 s-admins. So, what would I do then?
// only super admin can add admin (and/or smod)
$cant_add_groups = array(5,6); // use comma to seperate usergroups
$superadmins = array(1,2); // use comma to seperate more sadmin
if (!in_array($bbuserinfo['userid'], $superadmins) AND in_array($user['usergroupid'], $cant_add_groups))
{
print_stop_message('cant_add_admin');
}
i notice a slight problem with this... whats to stop the admin adding the 'admin' group as a member group of the user? Something else thats along this line, could we prevent normal admins from editing access masks to certain forums? ie the super admin only forum?
what you ask is a standard feature you have to be superadmin to edit admininistrator permissions
also people be VERRY CAREFULL with giving super admin a super admin is like root on linux he cando anything he likes .... forumpermissions can be set seperatly ...
what you ask is a standard feature you have to be superadmin to edit admininistrator permissions
also people be VERRY CAREFULL with giving super admin a super admin is like root on linux he cando anything he likes .... forumpermissions can be set seperatly ...
incorrect. superadmins are the only ones who can give admin PERMISSIONS however regular admins can move other users into the admin usergroup.
What i'm wondering is if theres anyway to make a superadmin forum that normal admins cannot see or grant access to. I also want to make a superadmin only ugroup for purposes of the show groups page... this would work but it dosn't check againt member groups...