[pmwiki-users] authuser vs. passwords

Eemeli Aro eemeli at gmail.com
Mon Nov 10 03:51:04 CST 2008


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