[pmwiki-users] Page question

Mailinglists mailinglists at wso.net
Mon Jun 23 09:57:38 CDT 2008

Thank you so much for the time and effort. I'm sure this will work.

The reason I didn't use AuthUser in the first place was to avoid the need for both a username and password. For my purposes just a password is more desirable. I may try a variation and just create an "if...then" kind of sequence where I check the password entered and redirect to the appropriate page.

This isn't a large site and I don't necessarily need it to automatically redirect based on login name. I'll take the tradeoff of having it be a little more of a manual configuration so that the end user only has to remember a password and not a username / password combo. Does this sound like something that would still work?

Thanks again.

At 02:04 PM 6/21/2008, you wrote:
>Saturday, June 21, 2008, 8:28:50 AM, Hans wrote:
>> I would think it should be easy to design using AuthUser;
>> then you got user names with associated passwords.
>> You just need to design the Login Form so on successful login
>> of a user it redirects to the ClientGroup.{$AuthId}  page.
>I got this working now by using a custom {(redir PageName)}
>markup expression. Install AuthUser and add to config.php
>$MarkupExpr['redir'] = 'RedirMx($pagename, $args[0])';
>function RedirMx($pagename, $n) {
>        global $AuthId, $action;
>        if ($action == 'edit' || $AuthId=='') return '';
>        if (substr($n,-1)=='.') return ""; #incomplete pagename provided
>        $pn = MakePageName($pagename, $n);
>        Redirect($pn, @"{\$PageUrl}?from=$pagename");
>        exit();
>then use in a page for Login:
>(:if !authid '' :)
>{(redir 'Profiles.{$AuthId}' )} 
>after login with user name 'Bob' for instance you will be
>automatically redirected to page 'Profiles.Bob'
>If you are not logged in, you will see the login link on the page,
>if you are logged in you are always redirected to the user page.
>Note this needed a custom markup to do the redirection; the normal
>(:redirect PageName:) directive does not work.
>  ~Hans
>pmwiki-users mailing list
>pmwiki-users at pmichaud.com

More information about the pmwiki-users mailing list