[pmwiki-users] Append read-auth password to url for instant login via link?

Tegan Dowling tmdowling at gmail.com
Thu Aug 24 16:25:44 CDT 2006


On 8/24/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Thu, Aug 24, 2006 at 03:21:03PM -0500, Tegan Dowling wrote:
> > On 8/23/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > >On Wed, Aug 23, 2006 at 03:51:51PM -0500, Tegan Dowling wrote:
> > >> Hi, List:
> > >>
> > >> I want to automatically log someone into a read-protected website
> > >> (w/default password-authentication type of security) using a password
> > >> string appended to the URL in another page, for example:
> > >>
> > >> http://www.somewiki.com/Main/HomePage?action=login&authpw=readpassword
> > >>
> > >> where readpassword is the group or page 'read' password.
> > >>
> > >> Is there a way to do that? I don't want them to see the password box;
> > >> I just want to pre-supply that and log them directly into the site.
> > >
> > >
> > >    if (!isset($_POST['authpw']) && @$_GET['authpw'])
> > >      $_POST['authpw'] = $_GET['authpw'];
> >
> > Hi, PM - I'm sorry, I've really tried to figure out how to use this,
> > but I just don't know enough. Could you tell me where to put it (and
> > maybe what I do after I put it there)? If it goes in local/config.php,
> > does it matter where?  Thanks so much for your help - sorry to be such
> > a pain.
>
> It can go in almost any local customization file, including
> local/config.php.  Ideally, it should occur as early as possible
> in the configuration file sequence (i.e., at the top of local/config.php
> would be better than at the bottom).  If you're using AuthUser, then
> it needs to go before the include of the authuser.php script.
>
> After adding the above, one can specify passwords from
> the url using "authpw=password" as in your example above.

Great!  I put it in config.php, just above the lines where I set my
passwords, and it works a treat.  Thanks so much!

Tegan




More information about the pmwiki-users mailing list