Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Members page tab displays itself to all users

edited January 2007 in Vanilla 1.0 Help
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?

Comments

  • assuming UserID == 1 is the the only admin change:
    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'); }
  • Brilliant, worked wonderfully. I just changed UserID = 1 to == 1. Thanks y2kbg.
  • Anytime!
This discussion has been closed.