[pmwiki-users] authuser
H. Fox
haganfox at gmail.com
Tue Jun 21 15:31:43 CDT 2005
On 6/21/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > Re: setting $Author when using authentication prompt:
> >
> > I hacked the function AuthenticateUser in authuser.php:
> > maybe this is a bit dirty, but it works so far:
>
> And it's a little overkill -- there's no need to
> modify authuser.php. If someone wants to set the author
> based on authentication then
>
> # ...set passwords and authuser settings...
> include_once('scripts/authuser.php');
> if ($AuthId) {
> $Author = $AuthId;
> setcookie('author',$Author,0,'/');
> }
>
> will do it.
This does set the $Author, but the user can change it. I had
discovered this alternative method.
if (@$_SESSION['authid']) $Author=$_SESSION['authid'];
As a diagnostic, I notice that
if (1 == 1) exit;
kills the script, but
$AuthUser['htpasswd'] = '.local/.htpasswd';
@include_once('cookbook/authuser.php');
if ($_SESSION['authid']) exit;
if ($AuthId) exit;
only kills the script when authentication occurs. Once the user is
authenticated it has no effect on subsequent page loads.
Hagan
> Pm
More information about the pmwiki-users
mailing list