Members page tab displays itself to all users
Ijust noticed that the Members page tab (created by Member's page extension) displays itself to all users of the forum--not just to the Admin.
How do I restrict access, so that *only* the Admin sees the Members' page tab?
How do I restrict access, so that *only* the Admin sees the Members' page tab?
0
This discussion has been closed.
Comments
if(isset($Menu) && $Context->Session->UserID > 0 && $eMembersConfig['AllowGuests'] == 0) { $Menu->AddTab($Context->GetDefinition('Members'), $Context->GetDefinition('Members'), GetUrl($Configuration, 'extension.php', '', '', '', '', 'PostBackAction=Members'), $Attributes = '', $Position = '50', $ForcePosition = '50'); } elseif(isset($Menu) && $eMembersConfig['AllowGuests'] == 1) { $Menu->AddTab($Context->GetDefinition('Members'), $Context->GetDefinition('Members'), GetUrl($Configuration, 'extension.php', '', '', '', '', 'PostBackAction=Members'), $Attributes = '', $Position = '50', $ForcePosition = '50'); }
to:
if(isset($Menu) && $Context->Session->UserID = 1 ) { $Menu->AddTab($Context->GetDefinition('Members'), $Context->GetDefinition('Members'), GetUrl($Configuration, 'extension.php', '', '', '', '', 'PostBackAction=Members'), $Attributes = '', $Position = '50', $ForcePosition = '50'); }