Like this post which showed you show stuff to certain member id or member level in WordPress, you can also achieve this in drupal by using “Role”. In drupal, members are recognized as “Role” where as in WordPress it is recognized as Level.
The snippet is quite simple and easy to understand. So I’m not going to explain into details. Just make sure you have the
if (is_array($user->roles) && in_array('role-name', $user->roles))
Show Stuff To "role-name"!!
Replace role-name with your custom role name and you’re good to go…