PDA

View Full Version : Hide Admin Profiles From Mods & supermods


LOTR
12-13-2002, 09:03 AM
Does anyone can help me on how i can hide my admins profiles from the mods and supermods so the admins can have their
own privacy :) ?

So when a mods or supermods login through the mods control panels they cant view the admins profiles?

Sorry i have search the entire web, cant find the hacks..
would anyone please help me? ???
10Q...

WetWired
12-13-2002, 02:22 PM
Open up mod/user.php.

Find the line:
// ###################### Start viewuser #######################
Then find the line
$user=$DB_site->query_first("SELECT userid,usergroupid,username,password,email,parente mail,coppauser,homepage,icq,aim,yahoo,signature,ad minemail,showemail,styleid,invisible,usertitle,cus tomtitle,FROM_UNIXTIME(joindate) AS joindate,cookieuser,daysprune,FROM_UNIXTIME(lastvi sit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,posts,timezoneoffset,emailnotification,em ailonpm,receivepm,ipaddress FROM user WHERE userid=$userid");
Add this below it
if($user[usergroupid]==6){
echo "<p>You do not have permission to do this!</p>";
exit;
}


As always, be sure to back up files you modify before modifying them. I may have made a typo, etc.

Chris M
12-13-2002, 02:50 PM
If you want to do it on a "per-user" basis, try this:)

Open mod/user.php
Find:
require("./global.php");

modlog(iif($userid!=0,"user id = $userid",""));
Underneath add:
if (($userid=="1") && ($bbuserinfo[usergroupid]!="6")) {
echo"<p>You cannot view this profile!</p>";
exit;
}

It works just as well as Logician's code, except this can target specific users as well;)

Satan

WetWired
12-13-2002, 03:23 PM
Why add the check for if it's an admin? Admins use admin/user.php, mods use mod/user.php . That's why my code just says if the user who's profile you're trying to view is an admin, give an error message.

LOTR
12-15-2002, 12:14 AM
thanx guys :).. works well with WetWired... although i cant find
this code by hellsatan..


modlog(iif($userid!=0,"user id = $userid",""));

but it works with Wetwired..:)

Chris M
12-15-2002, 06:22 PM
@Wet Wired - My code is on a per-user basis;)

Besides...What I posted has 2 advantages;)

a.) It can be used in the admin/user.php file, by just changing:
$bbuserinfo[usergroupdid]!="6"
to
$bbuserinfo[userid]!="x"
and turn it into a user check (replace "x" with your userid, and to add more users, just add before the first closing bracket:
or $bbuserinfo[userid]!="x"
as many times as you need (replacing "x" with userids allowed to view it)

b.) I sometimes browse the users with the mod/user.php file;)

@LOTR - Ah;) Just put it below:
require("./global.php");

I forgot that the "modlog" information is from a hack I installed by NTLDR:)

Satan