[pmwiki-users] Can't login with Site.AuthUser

Marc Cooper gmane at auxbuss.com
Wed Jul 26 02:31:52 CDT 2006


Jeff Alperin said...
> 
> On 7/25/06, H. Fox <haganfox at users.sourceforge.net> wrote:
> >
> > On 7/25/06, Jeff Alperin <jalperin at gmail.com> wrote:
> > > Additional information:
> > >
> > > The login works correctly only if I'm trying to browse to a page in this
> > > format:
> > > http://www.mysite.com/wiki/pmwiki.php?n=Main.HomePage
> > >
> > > Using either of the following, the login fails:
> > > http://www.mysite.com/wiki/pmwiki.php
> > > http://www.mysite.com/wiki
> > >
> >
> > Try
> >
> >    $pagename = ResolvePageName($pagename);
> >    include_once('scripts/authuser.php');
> >    $DefaultPasswords['edit'] = 'id:*';
> >    $DefaultPasswords['read'] = 'id:*';
> >    $DefaultPasswords['upload'] = 'id:*';
> >
> > Hagan
>
> Great!  Adding:     $pagename = ResolvePageName($pagename);    resolved the
> problem.
> 
> But, I don't understand what it does or why I needed to add it.  Can you
> explain?

Please try to avoid top-posting. Thanks.

>From pmwiki.php:

## ResolvePageName "normalizes" a pagename based on the current
## settings of $DefaultPage and $PagePathFmt.  It's normally used
## during initialization to fix up any missing or partial pagenames.

It makes use of MakePageName:

## MakePageName is used to convert a string into a valid pagename.
## If no group is supplied, then it uses $PagePathFmt to look
## for the page in other groups, or else uses the group of the
## pagename passed as an argument.

-- 
Best,
Marc





More information about the pmwiki-users mailing list