// 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'); }