Archived Boards and Threads... > Parham's PHP Tutorials

Changing what a user can see via their assigned group

(1/1)

Wh1teLeopard:
Just trying to make a different hello message appear to each user dependant on their usergroup to try help explain what features are available to them etc.

I can get the guest, and the admin thing, but for the life of me can't work out how you do it using their user group. This is as far as I've got at the moment:


--- Code: --- // GUESTS INTRO
if ($context['user']['is_guest'])
echo 'Hello Guest';
else
// NOMINATED MEMBERS INTRO
$context['member']['group']==11)
echo 'Hello Nominated Member';
else
// ADMIN INTRO
if ($context['allow_admin'])
echo 'HELLO ADMIN';

--- End code ---

At the moment if you take out the nominated member intro piece it works fine at say hi to guests and admin, but I need to find out how to make it say hi to nominated members too.

Many thanks for any help :)

Wh1teLeopard:
Doesn't matter, just went a different route in the end.

Mysia:
What file is this located in? I'd also like to change the hello to a different message.

Navigation

[0] Message Index

Go to full version