We need to add the option for the private or public tab, at the back end.
So we edit the .xml file of the plugin that creates the tab.
We can find it at: components/com_comprofiler/plugin/user/<the plugin>
we edit the .xml and add this code just before the:
</params>
Code:
<param name="menu_prv" type="radio" default="0" label="Private Tab" description="The tab will be private or public.">
<option value="0">Public</option>
<option value="1">Private</option>
</param>
[Make sure that from the back end you chose the state of the tab(
public/
private)].
Then from the same location open the main plaugin .php file and find:
function getDisplayTab.
Make sure you have the
global $_CB_framework;
After the:
$params = $this->params; add this code
Code:
if ($params->get('menu_prv') == '1'){
if ($_CB_framework->myId() != $user->id)
return null;
}