[pmwiki-users] identify current authorization level
Tegan Dowling
tmdowling at gmail.com
Thu Aug 3 14:06:47 CDT 2006
On 8/3/06, Henrik Bechmann <henrik at bechmannsoftware.com> wrote:
> Also, for future reference, a side effect of something
> (include_once('local/config.php')??) is that the author
> name is being lost between edit states, so the user has to re-enter it all
> the time -- not true before (I have $EnablePostAuthorRequired = 1;)
I had this problem. Never diagnosed it, because a colleague came up
with a snippet that fixes it. Mine wikis aren't in a wikifarm setup,
so I don't know how this would have to be adapted, but what I have is
(in this order):
//Require author name - http://www.pmwiki.org/wiki/Cookbook/RequireAuthor
$EnablePostAuthorRequired = 1;
//Author cookie
include_once("$FarmD/scripts/author.php");
if($AuthId && !@$_COOKIE[$AuthorCookie]) {
$Author = $AuthId; setcookie($AuthorCookie,
$Author, $AuthorCookieExpires, $AuthorCookieDir); }
which works to preserve author id from one edit to the next.
HTH
Tegan
More information about the pmwiki-users
mailing list