Go to the FreeLists Home Page Home Signup Help Login
 



[dokuwiki] || [Date Prev] [04-2006 Date Index] [Date Next] || [Thread Prev] [04-2006 Thread Index] [Thread Next]

[dokuwiki] Re: How to force login

  • From: Otto Vainio <oiv@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 06 Apr 2006 17:35:22 +0300
yoann hinard wrote:
Hello,

What happens if you turn off the READ privilege for group ALL?
That what's expected: I get an "access denied".
That is not what i wanted.

I did a small modification in inc/template.php, I replaced : case 'denied': print p_locale_xhtml('denied');

by :
case 'denied':
    html_login();

Perhaps something cleaner would test a new option.

Would a cleaner way be modifying the template?

Checkin $INFO['userinfo'] or $INFO['perm'] should do it.

So put either

<?php
if (!is_array($INFO['userinfo'])) {
  html_login();
}
?>

or

<?php
if ($INFO['perm']==0) {
  html_login();
}
?>

some good place in your template/main.php.



brgds Otto
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist




[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.