PDA

View Full Version : Usergroups - Limiting changability...


Chris M
08-03-2002, 01:43 PM
Hi:)

With my Lesser Admin Cp, I still want my Admins to be able to change Usergroups...I just dont want them to be able to change them to Admins or Co-Admins...

How?

Satan

Xenon
08-03-2002, 01:50 PM
you know the usergroups of your admin/coadmin groups right so open the admin2/user.php (a admin/user.php which is copied to admin2 i think ;))

and find this:
$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupi d='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invi sible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cook ieuser=$cookieuser,nosessionhash=$nosessionhash,da ysprune='$daysprune',lastvisit=$lastvisit,lastacti vity=$lastactivity,lastpost=$lastpost,posts='$post s',timezoneoffset='$timezoneoffset',emailnotificat ion=$emailnotification,receivepm='$receivepm',emai lonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid");

just before add:
if($usergroupid==6 or $usergroupid==x) {
echo "You are not allowed to create Admins/CoAdmins";
exit;
}

replace the x with your coadmin groupid. 6 is your admingroupid ;)

Chris M
08-03-2002, 02:36 PM
Thanks:)

Will that work for modifying and adding users?

Edit: Never mind:) Thanks for that Xenon - I'll add it as a feature in the Lesser Admin Cp!:)

Satan