Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
Config Plugin and NT Auth
Avatar
barneym #1
Member since Jun 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
Subject: Config Plugin and NT Auth
I've noticed an obscure problem with the Config plugin for managing the local.php and dokuwiki.php settings.

The instructions for implementing automatic login available on the DokuWiki main site, call for a block of code to be added at the top of local.php similar to the below.  This extracts the user name from the authentication string to facilitate the rest of the process:

if (isset($_SERVER['AUTH_USER']) and !isset($_SESSION[$conf['title']]['auth']['info'])) {
    list($d, $username) = split("\\\\", strtolower($_SERVER['AUTH_USER']), 2);
    $_REQUEST['u'] = $username;
}


The problem is that this renders the Config plugin useless as any modifications immediately wipe the above line and disable automatic authentication (**neat**).

I wanted to modify Config so that either a) the above could be tagged via comments as a "do not touch" area of the local.php, or b) allow configuring the above code within Config, or c) place the above code in a better location.

Unfortunately, I was not able to fully grock how the Config plugin and its underlying config data object manipulated all of the parts adequately to identify an easy solution.

Admittedly I haven't had a lot of time with this problem, but if anyone has guidance or suggestions on how to best implement/proceed on this issue, please let me know.

Thanks,

Barney
Avatar
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3528 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Put your code into conf/local.protected.php - the config plugin won't touch it.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
barneym #3
Member since Jun 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
Thanks!  This worked perfectly.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-26, 15:37:57 (UTC +01:00)