PDA

View Full Version : Admincp UserID Lookup


Mickie D
09-14-2013, 12:46 AM
Hi all,

I wondered would it be possible to wrap certain files in the admincp with a userid lookup

IE


if ($userid=1){
All code wrapped
} else {
Print error
}



I just put that so you get an idea of what I was trying to do, I am looking for the global that would allow that call

Cheers
Mick

ozzy47
09-14-2013, 09:06 AM
Why not just use the Administrator Permissions to select what each admin has access to?

nhawk
09-14-2013, 09:09 AM
Yes you can. It would start after the requires and would look something like this...

require_once('....');
--- other required files if appliacable --
if($vbulletin->userinfo['userid'] == 1)
{
VBCODE HERE
}else{
YOUR CODE HERE
}

--------------- Added 1379153508 at 1379153508 ---------------

Why not just use the Administrator Permissions to select what each admin has access to?

I THINK he's trying to lock down the ACP to user 1 to help prevent hacking.

I'm not sure it would do the job, but it might be worth a shot.