Created
September 10, 2014 21:26
-
-
Save brandonratz/6a622fbc040e69e368df to your computer and use it in GitHub Desktop.
Drupal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Load the currently logged in user. | |
global $user; | |
// Check if the user has the 'editor' role. | |
if (in_array('editor', $user->roles)) { | |
// do fancy stuff | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment