Hello all,

I‘m trying to render different tabs on the user profile page based on the id of profile's owner, that's the code I put into the template.php file, where a3_atlantis is the theme name. If I log myself in as an authenticated user, the tabs are still there. The tab I wanna disable is generated by the Views module. Any hints?

/**
* Generate the HTML output for a single local task link.
*
* @ingroup themeable
*/
function a3_atlantis_menu_local_task($link, $active = FALSE) {
// only disable the tab linked to "veranstaltungen"
if (preg_match("/veranstaltungen/", $link) && arg(0)=="user") {
//load the user based on the id obtained through the path to the profile
$user = user_load(arg(1));
// and if the user is assigned to the editor role return the tab, else omit the tab
if (in_array('editor', $user->roles)) {
return '<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li>\n";
} else {
return ' ';
}
}
return '<li '. ($active ? 'class="active" ' : '') .'>'. $link ."</li>\n";
}