|
Cookbook /
StoredAuthNameSummary: How to set a stored author name to an authenticated user
Version: 2011-08-05
Prerequisites: AuthUser must be installed
Status: Stable
Maintainer: AntonyTemplier
Categories: Administration, Security
QuestionHow can I set automatically a stored author name to an authenticated user? AnswerFor sites with authenticated users with AuthUser, this script allow you to use author name ($Author) stored in the SiteAdmin.AuthUser page and to automatically set the author name in the author field in case it's blank. It does the same job as you can see at Cookbook:RequireAuthor in automatically setting an author name and, optionally, enforcing author tracking but with stored information. Installation instruction
include_once(UsageTo set an author name: Edit your AuthUser page :
and add lines like this one: userid::authorname Where userid is If no author name is found, the author name is set to the user id. To enforce author tracking for authenticated users, you can set the variable $ForceAuthorTracking in your local/config.php just before the include_once function, like this: $ForceAuthorTracking=1; # 1 to enable, 0 (default) to disable
include_once(NotesTipsMaybe this recipe can help to manage author tracking in a more convenient way by grouping several ideas found in the cookbook:
VersionsThis recipe works with PmWiki >= 2.1.beta20.
But for previous version you can change The variable
Releases
CommentsUsing pmwiki-2.1.11 (with the default template) and this recipe I found that I had to place the include for authuser before the include for storedauthname. If storedauthname was placed first users would have to login in twice. After first login attempt the user would be shown the login page again. After I figured that out it appears to be working nicely. Dale Ray (http://www.coranto.org/wiki/(approve links)) July 28, 2006 Needs modification for Scott Connard December 01, 2009, at 10:10 PM This has been updated since version 2011-06-10
See AlsoContributorsUser notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |