I have installed the module subusers and appears a tab named "Subusers" in the profile. How can I remove this tab?
I tested this code in template.tpl.php and I didn't work:
function mytheme_preprocess_page(&$vars) {
$unwanted_tabs = array('user/%/subuser');
foreach ($variables['tabs'] as $group_key => $tab_group) {
if (is_array($tab_group)) {
foreach ($tab_group as $key => $tab) {
if (isset($tab['#link']['path']) && in_array($tab['#link']['path'], $unwanted_tabs)){
unset($variables['tabs'][$group_key][$key]);
}
}
}
}
}
I tried with this code:
function mymodule_menu_alter(&$items) {
unset($items['user/%/subuser']);
}
Thanks.