PDA

View Full Version : Permissions limit question


Thanatos
05-29-2005, 01:42 PM
out of the user.php file I'd like to limit this:

"user.php?$session[sessionurl]do=remove&userid=$userid"
=> $vbphrase['delete_user'],


So that only myself and 1 other admin have the ability to delete a user.

How would I write that out in php within that file?

thanks!

Revan
05-30-2005, 07:35 AM
Wrap this around the function or whatever printing that out:
if ($bbuserinfo['userid'] == $yourid OR $bbuserinfo['userid'] == $theotherid)
{
}
Replacing the $'s respectively.

Thanatos
05-30-2005, 02:25 PM
Thank you so much!

but unfortunately, I cant get it to work without getting a parse error :(

"../$modcpdir/banning.php?$session[sessionurl]do=banuser&userid=$userid"
=> $vbphrase['ban_user'],
if ($bbuserinfo['userid'] == 1 OR $bbuserinfo['userid'] == 2)
{
"user.php?$session[sessionurl]do=remove&userid=$userid"
=> $vbphrase['delete_user'],
}
)

);


thats what it looks like in the actual file.

Revan
05-31-2005, 05:35 AM
Well obviously, as that line exist in the middle of an array. Then Im not sure how to do it :P

deathemperor
05-31-2005, 05:49 AM
@Miratos, you can't do that just like on your template, my opinion is you should devide that array so that you can use that condition which Revan provided.