Display tabs to users in specific groups

Started by William Wolfe, January 26, 2013, 04:15:23 PM

Previous topic - Next topic

William Wolfe

I've been customizing the page tabs on my forum. I want to display one only if a user is in the "Has Email" group. How would I do that? I already know how to add regular tabs/sub tags by editing Subs.php.

I'm guessing the code would be similar to 'show' => $user_info['is_guest']?
William Wolfe

Arantor

Similar, but not quite the same.

Is that group based on having a permission or something else? What is 'has email' group?

William Wolfe

Quote from: Arantor on January 26, 2013, 04:31:18 PM
Similar, but not quite the same.

Is that group based on having a permission or something else? What is 'has email' group?

It's a hidden membership group assigned by admins. It doesn't add or remove any permissions.
William Wolfe

Arantor

OK, so what id number does it have? You can find it out from the admin panel by going to the edit membergroups list, and if you hover over the edit button, you'll see the group id number as the last part of the URL

William Wolfe

William Wolfe

Arantor

In which case, use:
'show' => in_array(23, $user_info['groups']), for that line of the menu definition.

William Wolfe

William Wolfe

Advertisement: