By denoteone on
Is it possible to write an if statement in the page.tpl.php file that first gets the user role and then compares it to a string and it either shows the logo or doesn't. Something like....
//some how get user role
global $user;
$user_fields = user_load($user->uid);
$current_role = $user_fields->role[];
if ($current_role == "public_user"){
>?
print $front_page; " title=" print t('Home'); " >
print $logo; " alt=" print t('Home'); " />
?>
}else{
//don't show.
}
Comments
more than one role...
Because users can have more than one role -- like "authenticated user" AND "classifieds editor" -- the values are in an array. so, something like this:
alternatively, check for access within role, by permissions (not role):