Kathryn, when you've confirmed this works, would you consider adding it to
the site, as a recipe or as notes on the existing AuthUser page?
Also, something to check for: In my experience of trying to use AuthUser, I
found that on a **site** with AuthUser enbled, but **pages** configured to
allow login via the non-AuthUser, native authentication, based on the
password alone (set by config.php or page attr or group attr), someone
logging in by clicking a (v2.1.26 syntax) [[{$Name}?action=login | Login]]
link, and using their miscellaneous username plus the password, would be
successfully logged in, but left hanging, looking at the Site.AuthForm,
instead of being returned to ?action=browse. Even expert users get confused
and think their login has failed, when they're not returned to
?action=browse.
Just a heads up -- something to confirm isn't happening, or else that you
find a work-around, if it does.
Tegan
On 1/22/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
On Mon, Jan 22, 2007 at 05:24:41PM +1100, Kathryn Andersen wrote:
> include_once("$FarmD/scripts/author.php");
> include_once("$FarmD/scripts/authuser.php");
> # The author is prepended with the authId
> # To make this easier, use '-' as a separator
> # AuthId-Author
> if ($Author) {
> if (strstr($Author, '-') != false) {
> $auth_split = explode('-', $Author, 2);
> $Author = $AuthId . '-' . $auth_split[1];
> } else if ($Author != $AuthId) {
> $Author = $AuthId . '-' . $Author;
> } else {
> $Author = $AuthId;
> }
> } else {
> $Author = $AuthId;
> }
Simpler is:
include_once("$FarmD/scripts/author.php");
include_once("$FarmD/scripts/authuser.php");
$Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
> - the Recent Changes page says that the change was made by "Kathryn".
> (bad)
> ...
> So why isn't the "userid-Kathryn" being used in the Recent Changes page
> in case A?
The RecentChanges pages use $AuthorLink (not $Author) for
generating the attributions in each entry. $AuthorLink is
set by author.php -- which for a first-time login is happening
before the $AuthId manipulations a bit later.
Simply be sure to also (re)set $AuthorLink when changing $Author:
include_once("$FarmD/scripts/author.php");
include_once("$FarmD/scripts/authuser.php");
$Author = "$AuthId-" . preg_replace('/^[^-]*-/', '', $Author);
$AuthorLink = "[[~$Author]]";
Pm
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users