[pmwiki-users] Page question

Mailinglists mailinglists at wso.net
Tue Jun 24 13:54:14 CDT 2008


At 02:18 PM 6/23/2008, you wrote:
>Here is a conditional for plain text password checks inside a wiki
>page:
>$Conditions['authpw'] = 'NoCache(end(@$GLOBALS["AuthPw"])==\$condparm)';
>then you can use conditionals like
>(:if authpw abcdefg:)(:redirect ClientA:)
>(:if authpw hijklmn:)(:redirect ClientB:)
>etc.

Hans,

Hitting a small snag, and it may be just my lack on knowledge of the auth system. I put the $Conditionals code in config.php. I then added some if statements to the Clients.HomePage like your example. The problem is how do I get Clients.HomePage to prompt me for a password and then reload itself to check the password against my if statements, and then subsequently redirect?

Here's what I'd like to happen:

1. Client clicks on a link that goes to Clients.HomePage
2. If they are already logged in they will be redirected based on their password using if statements embedded in Clients.HomePage
3. If they are not already logged in they will be prompted to enter a password. Once they click submit they will be redirected based on their password using if statements embedded in Clients.HomePage

The if statements in Clients.HomePage look like this:

(:if authpw client_a_password:)(:redirect Clients.A:)
(:if authpw client_b_password:)(:redirect Clients.B:)

Continuing with the above example, the individual client pages (like Clients.A) will have their read password set to client_a_password. Clients.B will have a read password of client_b_password, etc...

Thank you...







More information about the pmwiki-users mailing list