By Rosamunda on
Hi there!
I´ve got this PHP snippet that allows me to show the tabs only to authenticated users.
How do I modify this to show only if it does belong to that role, but does NOT belong to role X?
<?php global $user; //el link aparece sólo para usuarios registrados
if (is_array($user->roles) && in_array('authenticated user', $user->roles)) {?>
<?php if ($tabs): ?>
<div id="content-tabs" class=""><?php print $tabs; ?></div><!-- /#content-tabs -->
<?php endif; ?>
<?php } ?>
I know that maybe it should contain something like an elseif, and the negative ! sign. But how do I do that?
Thanks for your help!!
Rosamunda
Comments
I would replace
I would replace
with
Thanks!
Thank you, nevets!