[pmwiki-users] Author field and usernames problem

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 22 09:50:33 CST 2007


On Mon, Jan 22, 2007 at 02:28:13PM -0000, mcabano at deis.unibo.it wrote:
> I set all the necessary parameters in config.php for always requiring an 
> author and setting the author field to the username login value.
> [...]
> For example, if I modify a page which requires particular privileges:
> 1) At first Firefox asks for authentication
> 2) I insert my username (e.g. john.smith) and my password
> 3) Then I verify the cookie which is correctly set
> 4) On edit page author field is correctly set to john.smith only the 
> firs time I edit (then It will be johnsmith)
> 5) I edit and save page modifications
> 6) In Site.AllRecentChanges page this operation is recorded correctly 
> but the user logged is "johnsmith" (dot has disappeared)

If you want the Author name to always exactly follow the username 
login value, then use the following sequence:

    include_once('scripts/authuser.php');
    if (@$AuthId) $Author = $AuthId;

See http://www.pmwiki.org/wiki/Cookbook/RequireAuthor for more details.

Pm




More information about the pmwiki-users mailing list