[pmwiki-users] $Author from $AuthId in b26
Roman
romat2 at gmail.com
Fri Feb 24 10:07:12 CST 2006
> If a site administrator wants to enforce that an Author name should
> always be the same as the login name, then it can be easily done
> by putting
>
> if (@$AuthId) $Author = $AuthId;
>
> after the include_once('scripts/authuser.php'); line (or whatever
> is setting the value of $AuthId).
That's it, thanks. I went further and wanted to disable Author field
in edit form at all because I don't want authors to be able to
ovewrite their login name. So I put this to Site.EditForm
(:if !authid:)
$[Author]: (:input e_author:)
(:ifend:)
But it seems that this field is required because either author is not
filled in RecentChanges (when $EnablePostAuthorRequired = 0;) or I am
not able to save a page (when $EnablePostAuthorRequired = 1;). So my
question is: is there a way how to disallow a change of author name if
user is logged?
Roman
More information about the pmwiki-users
mailing list