How to hide the Login button?

Version 2.1 by Lucas Charpentier (Sereza7) on 2024/11/19

XWiki 16.10.0+ 

 XWiki has a login button on the top navigation bar. 

https://www.xwiki.org/xwiki/bin/download/ReleaseNotes/Data/XWiki/16.10.0RC1/Entry002/WebHome/22121-navbarloggedOut.png?rev=1.1

___

The register button can easily be removed by removing the guest user permission to Register.

The Log-in button needs a more specific action:

  • Log in as an admin of your wiki
  • Access the hidden page Registration. In order to toggle hidden page display, use x+x+x+h.
  • Edit the objects of the Registration page. In order to have the UI button to edit page objects, make sure you're an advanced user with x+x+x+a.
  • Update the content of the XWiki.UIExtensionClass object you can find on Registration:
    • Remove lines 11 to 15, containing the template for the button:
#if ($xcontext.user == 'XWiki.XWikiGuest' && !$xcontext.inactiveUserReference)
<li>
  <a href="$xwiki.getURL('XWiki.XWikiLogin', 'login', "xredirect=$redirectURL&loginLink=1")" id="tmLogin" rel="nofollow">$escapetool.xml($services.localization.render('login'))</a>
</li>
#end
  • Save your changes.

From then on, the login button in the navbar will not be shown anymore on your wiki.

Get Connected