[pmwiki-users] Author setting in two different ways

Jon Haupt jhaupt at gmail.com
Fri Jun 9 16:49:39 CDT 2006

On 6/9/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Jun 09, 2006 at 12:02:27PM -0500, Jon Haupt wrote:
> > Hi there,
> >
> > So I'm using AuthUser and enforcing author tracking on my wiki.
> > Everything works fine except that one group on my wiki has a simple
> > read/edit password (so it doesn't require authenticated ID).  The
> > problem here is if they type in an author name, this isn't copied to
> > $Author like an $AuthId is.  Is there a way to do this so that either
> > way, the author cookie is automatically set if they enter one (whether
> > it's an authenticated ID or just a name to go with the password)?
> It's not pretty, but try the following in local/config.php:
>   if (@$_POST['authid'] && !@$_COOKIE['author'])
>     $_POST['author'] = $_POST['authid'];
> This will use the username field (from the authentication form)
> to set the author cookie if one hasn't already been set.
> Pm

Thanks, that worked.  Because I wasn't quite sure what it would do, I
tried just putting it in my Group.php, and that also worked.


More information about the pmwiki-users mailing list