$user Conditionals

This is one example of performing an action based on whether or not the current user belongs to a certain role or roles. Note that the admin user (UID #1) matches as well.

Note: You may want to try using drupal_goto()  (or drupal_access_denied() in this case) instead of a header redirect.

Leave a Reply

Your email address will not be published.