But it is after sad

here's that snippet of common.php

 // Check/update/set cookie and fetch user info
$pun_user = array();
check_cookie($pun_user);

if($pun_user['id'] == 3)
 $pun_user['g_id'] = PUN_ADMIN;

// Attempt to load the common language file

Looks like there is some stupid mistake, that I can't see...
Any advices?

>>> May I remind you: this will nowhere show up, except for the admin interface the user himself sees.

I, understand this, after all that's undercover admin smile

But when logged in under that account, I cant access admin_options.php or edit messages of other users, i.e. no sign of admin privileges at all sad

 if($pun_user['id'] == 3)
$pun_user['g_id'] = PUN_ADMIN

Guess I need to check that this condition evaluates to TRUE and the statement where g_id changes executes. How can this be done? php syntax seems a little bit strange to me smile

Hi, elbekko!

Absolutely no mods, just clean PunBB 1.2.15 install.

So. am I inserting the right code in the right place and it still doesn't work!?

Ok, don't know exactly why, but let it be without $.

Anyway, any ideas how to make undercover admin work?

But = is the assignment operator and == is comparison operator, so your code should just return boolean value.

I'm not even sure that the condition evaluates to TRUE and this statement runs. I just don't know how to check this.

Or should i use $ prefix before PUN_ADMIN ?

Hi!
I've followed the instructions from here

added the following:

 if($pun_user['id'] == 3)
$pun_user['g_id'] = PUN_ADMIN;

to /include/common.php right after line 118 (or something)

 // Check/update/set cookie and fetch user info
119     $pun_user = array();

I looked in db table users and found that id of the user that i want to be admin is 3.

But it isn't working. why?