Jump to content

Not checking for admin


plasmagames

Recommended Posts

Quote: Maq

First post I noticed that you're using an operator to compare the $admin variable.  You have:

 

if ($admin = '2');

 

and needs to be

 

if ($admin == 2) {

 

There are a couple other basic mistakes...

 

Anyway, you need to have a session that stores the user's ID.  That way when you can check if they're admin on any page.

 

Is uMemberGroup a field in your database?

 

to answer your question. in the config.php file(included with all pages) there are some renaming of $logged variables

$uId = $logged['id'];
$uName = $logged['username'];
$uEmail = $logged['email'];
$uMsn = $logged['msn'];
$uIp = $logged['ip'];
$uSignup = $logged['signup'];
$uLevel = $logged['level'];
$uGtalk = $logged['gtalk'];
$uMsn = $logged['msn'];
$uAim = $logged['aim'];
$uLocation = $logged['location'];
$uBio = $logged['bio'];
$uGroup = $logged['gid'];
$uMembergroup = $logged['membergroup'];

 

$uMembergroup = $logged['membergroup'];

and membergroup is the field in the database as are location, id etc. so yes it is in the database so to speak

Link to comment
Share on other sites

For starters, your original thread is not marked 'solved' (even if it where you can simply mark it not solved) so all you need do is gently bump it to the top to continue the discussion. Multi posting is against our guidelines.

 

Secondly, your original topic and now this one are both in the wrong board. They ought be within 'Third Party Scripts'.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.