It's better when it's simple

User Tools

Site Tools


Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community

Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy


Login instead of forbidden

It is quite annoying, that you have to click the Login button to access the login form when you visit a restricted page (not being already logged in, of course). This small patch automatically displays the login form in such a case.

Please mail remarks, suggestions etc. to bihler [at] iai [dot] uni [dash] bonn [dot] de.

Available as a Plugin

This functionality is available in a Plugin: showlogin
Christian Marg 2008/12/15 13:12

Instructions for version 2007-06-26b

In inc/template.php, replace line 119 by this code:

      if ($_SERVER['REMOTE_USER'])
          print p_locale_xhtml('denied');

Based on dokuwiki-2009-02-14b as line 119 is a break. Instead find the 'case'denied':' then use the if statement.

   case 'denied':
 /*     print p_locale_xhtml('denied'); */
       if ($_SERVER['REMOTE_USER'])
          print p_locale_xhtml('denied');

In addition, you might want to adapt the text in inc/lang/<yourlang>/denied.txt by removing the maybe not logged in text.

tips/login_instead_of_forbidden.txt · Last modified: 2009-06-04 13:28 by