[pmwiki-users] Automatic author name
Sandy
sandy at onebit.ca
Wed Nov 15 08:59:54 CST 2006
Hans Huijgen wrote:
> 2006/11/15, Hans Huijgen <lighans at gmail.com>:
>> What I would like is that if someone logs in, the author name is
>> automatically entered in the author field. That was possible in older
>> versions. Is that still possible?
> Sorry, did find it myself. &AuthId (or $AuthUser used in config.php)
> is required.
> But now I can explain to me, that on some sites (with specified
> author's) it did work and on others (with $author or id:* in
> config.php) it didn't.
>
> It;s allways good to know how stupid I am (-:
>
For what you want to do, from:
http://pmwiki.org/wiki/Cookbook/RequireAuthor :
For sites using PmWiki's authuser.php script, use the following:
(in either /pmwiki/local/farmconfig.php or /field1/local/config.php)
# Force author name to match login name
include_once("scripts/authuser.php");
$Author = $AuthId;
It's helpful to recognize that the Author name and the authenticated
user name are separate in PmWiki. From an email message by Pm:
$AuthId = verified author identity (stored in $_SESSION['authid'])
$Author = author's name (stored in $_COOKIE['author'])
Sandy
More information about the pmwiki-users
mailing list