By leapmonkey on
I want to know if there is a way to have menu's visible to only certain users based on the roles assigned. I was able to do somethign similar with blocks y adding php to it
global $user;
foreach ($user->roles as $rid => $name) {
if ($rid == '2') {
echo '<ul>
<li><a href="https://google.com/">trial</a>
</ul>';
}
}
but this has to be done manually and its not a menu.
how would i go about making the menu visible to only certain roles.
Comments
There's a solution here...
pwolanin posted a solution here over http://drupal.org/node/56641#comment-107384
I've tried it and it works well using 4.7
anything for 4.6?
Im using 4.6 right now
any suggestions for 4.6?
also how do you patch the modules in windows?
Over here...
pwolanin posted a 4.6 solution here...
http://drupal.org/node/52142#comment-121799