<span class="q">Kathryn, w</span>hen you&#39;ve confirmed this works, would you consider adding it to the site, as a recipe or as notes on the existing AuthUser page?<br><br>Also, something to check for:&nbsp; 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.&nbsp; Even expert users get confused and think their login has failed, when they&#39;re not returned to ?action=browse.<br><br>Just a heads up -- something to confirm isn&#39;t happening, or else that you find a work-around, if it does.
<br><br>Tegan<br><br><div><span class="gmail_quote">On 1/22/07, <b class="gmail_sendername">Patrick R. Michaud</b> &lt;<a href="mailto:pmichaud@pobox.com">pmichaud@pobox.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Mon, Jan 22, 2007 at 05:24:41PM +1100, Kathryn Andersen wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; include_once(&quot;$FarmD/scripts/author.php&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; include_once(&quot;$FarmD/scripts/authuser.php&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # The author is prepended with the authId
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # To make this easier, use &#39;-&#39; as a separator<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # AuthId-Author<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($Author) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (strstr($Author, &#39;-&#39;) != false) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $auth_split = explode(&#39;-&#39;, $Author, 2);
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Author = $AuthId . &#39;-&#39; . $auth_split[1];<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if ($Author != $AuthId) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Author = $AuthId . &#39;-&#39; . $Author;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Author = $AuthId;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $Author = $AuthId;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Simpler is:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;include_once(&quot;$FarmD/scripts/author.php&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;include_once(&quot;$FarmD/scripts/authuser.php&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;$Author = &quot;$AuthId-&quot; . preg_replace(&#39;/^[^-]*-/&#39;, &#39;&#39;, $Author);<br><br>&gt; - the Recent Changes page says that the change was made by &quot;Kathryn&quot;.
<br>&gt;&nbsp;&nbsp; (bad)<br>&gt; ...<br>&gt; So why isn&#39;t the &quot;userid-Kathryn&quot; being used in the Recent Changes page<br>&gt; in case A?<br><br>The RecentChanges pages use $AuthorLink (not $Author) for<br>generating the attributions in each entry.&nbsp;&nbsp;$AuthorLink is
<br>set by author.php -- which for a first-time login is happening<br>before the $AuthId manipulations a bit later.<br><br>Simply be sure to also (re)set $AuthorLink when changing $Author:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;include_once(&quot;$FarmD/scripts/author.php&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;include_once(&quot;$FarmD/scripts/authuser.php&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;$Author = &quot;$AuthId-&quot; . preg_replace(&#39;/^[^-]*-/&#39;, &#39;&#39;, $Author);<br>&nbsp;&nbsp;&nbsp;&nbsp;$AuthorLink = &quot;[[~$Author]]&quot;;<br><br>Pm<br><br>
_______________________________________________<br>pmwiki-users mailing list<br><a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br><a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users
</a><br></blockquote></div><br>