Jump to content

[SOLVED] Help with hiding content from user groups


herghost

Recommended Posts

Hi, I am wondering if anyone can help me with this.

 

I have a site which is basically a social network site, when a user logs in a menu bar appears, done by the code

{if $user->user_exists != 0}

which I understand basically means, if the user exists, then show the menu. On the menu I have a set up links, all in this format:

 

<td class='menu_item'>
      <a href='user_contactmodel.php' class='menu_item'><img src='./images/icons/phone.gif' border='0' class='icon'>{$header26}</a>
    </td>

 

which works fine, the all display.

 

I also have different user groups, depending on the type of account they have, as far as I can tell, from phpmyadmin the data is stored in a table called se2_users and is controlled by an element user_level_id, with levels 1,2,3 or 4

 

Say I wanted to only give access to level 4, what would I need to do? Also the file is a template file (.tpl) does this affect anything?

 

I assumed it would be something like :

 

{if $user->user_level_id != 4}

 

but this gives me a smarty error.

 

Thanks for any help :)

Archived

This topic is now archived and is 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.