[pmwiki-users] authuser vs. passwords

Swift, Chris Chris.Swift at eu.dodea.edu
Mon Nov 10 04:43:58 CST 2008


That worked just fine!  I'll add that as documentation for the PMWiki
site. 


Thanks,
 
Chris 
 
 
 

-----Original Message-----
From: Eemeli Aro [mailto:eemeli at gmail.com] 
Sent: Monday, November 10, 2008 10:51 AM
To: Swift, Chris
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] authuser vs. passwords

2008/11/9 Swift, Chris <Chris.Swift at eu.dodea.edu>:
> Anyone have any ideas how to make the PMWiki site have them 
> authenticated via AuthUser, but then only make them type in a password

> to be access password protected pages/groups within the site?

As Vince said, leaving the username field blank has the same effect as
just having a password field.

However, if you want to hide the username field for already logged-in
visitors, you can edit the page Site.AuthForm on your wiki for example
by changing the following conditional

(:if enabled EnableAuthUser:)

to

(:if ( enabled EnableAuthUser && !authid ) :)

This means that the "Name:" field won't be shown if the user is already
logged in.

Alternatively, for extra fanciness, you could use something like the
following instead of that whole line:

(:if enabled EnableAuthUser:)$[Name]:
(:if2 authid:){$AuthId}(:else2:)(:input text name=authid:)(:if2end:)\\

Note that this assumes you've got at least version 2.2.0-beta66 for the
nested if functionality.

eemeli



More information about the pmwiki-users mailing list