[pmwiki-users] Author setting in two different ways
Patrick R. Michaud
pmichaud at pobox.com
Fri Jun 9 15:52:36 CDT 2006
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
More information about the pmwiki-users
mailing list