Created
May 5, 2011 00:12
-
-
Save sobi3ch/956292 to your computer and use it in GitHub Desktop.
helper function in template or module
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 | |
function user_is_editor() { | |
global $user; | |
if(in_array(array('employee editor', 'administrator'), $user->roles) || $user->uid == 1) { | |
return TRUE; | |
} else { | |
return FALSE; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in array put your roles that have appropriately roles to be editor