This topic is locked

Show / Hide info dependant on user.

1/28/2008 1:52:47 PM
PHPRunner General questions
M
mmponline author

I got the following code to show or hide info dependant on the specific user:

Add the if statement in front and after text:

{if $admin_user}

<P align=center><FONT face=Arial size=2><A

href="menu.php">Menu</A></FONT>{/if}
Add the following to before display event:
$smarty->assign("admin_user", $_SESSION["GroupID"]=="User");


How do I alter the event string to show hide a second, third, etc. Group's info. IOW not only the User group, but say the ADMIN and BUYER'S group as well

J
Jane 1/29/2008

Stephan,
here is a sample:

if ($_SESSION["GroupID"]=="User" || $_SESSION["GroupID"]=="Admin" || $_SESSION["GroupID"]=="BUYER")

$smarty->assign("admin_user", 1);

M
mmponline author 1/29/2008

Thanks Jane
Still to try it, but I'm sure it will do the job...