[Pmwiki-users] Can basic authentication supply user name to PmWiki?

Patrick R. Michaud pmichaud
Wed Dec 1 06:48:22 CST 2004


On Wed, Dec 01, 2004 at 01:16:24AM -0500, Neil Herber wrote:
> I have an instance of PmWiki running inside a protected realm (on a virtual 
> host, if that matters).
> 
> How can I pick up the HTTP UserName and force it into the author field on 
> all edits? I do not want to restrict access to the Wiki in any way because 
> the user has already been authenticated.

In your config.php, add:

   if (@$_SERVER['REMOTE_USER']) $Author = $_SERVER['REMOTE_USER'];

This will set the author field on all requests authenticated by the webserver.  
It will even override anything the author happens to put in the "Author" 
box on the edit form.

> I may have to move one of these systems behind SSL. Does that present any 
> problems to PmWiki?

Not really.  You'll probably need to set new values for $ScriptUrl and
$PubDirUrl in your config.php (to use https: instead of http:), but 
that's about it.

Pm



More information about the pmwiki-users mailing list