Re: [PHPLIB] Bailing out of loginform.ihtml? From: Mike Green (Mike.Green <email protected>)
Date: 11/15/99

Well, maybe I'm not quite tuned in to your problem, but if I am the following
could help:

I use have modified the function auth_validatelogin() given in the sample
local.inc (local.inc,v 1.23 1999/08/25 11:40:48 kk) so that the first few lines
are:

function auth_validatelogin() {
    global $username, $password;
    if(isset($username)) {
        $this->auth["uname"]=$username; ## This provides access for
"loginform.ihtml"
    }else if ($this->nobody){ ## provides for "default
login cancel"
        $uid = $this->auth["uname"] = $this->auth["uid"] = "nobody";
        return $uid;
    }
    $uid = false;
...

[instead of
function auth_validatelogin() {
    global $username, $password;
    if(isset($username)) {
      $this->auth["uname"]=$username; ## This provides access for
"loginform.ihtml"
    }
    $uid = false;
...
]

As I study what I've done here I can see that it suffers from a classic case of
insufficient documentation. When I created this ("hack"?!) I think I figured
out what needed to be done and did this. Now that I look at it I'm cannot
explain it -- except that it is working :-) ... or should that be a ;-(...

Cheers!

Mike

Patrick _ wrote:

> Hi,
>
> Nope, still throws you back at the login screen.
> Perhaps of interest: I use default authentication.
>
> Regards,
> -Patrick
>
> >From: "Oreste Dimaggio" <oreste <email protected>>
> >To: <phplib <email protected>>
> >Subject: RE: [PHPLIB] Bailing out of loginform.ihtml?
> >Date: Mon, 15 Nov 1999 17:30:17 +0100
> >
> > >
> > > Hi,
> > >
> > > No, doesn't work for me. It retains the session_id but throws me
> > > back to the
> > > login screen.
> > >
> >
> >Try with <? echo getenv("HTTP_REFERER"); ?>

--
Mike Green
SaeSolved::
http://www.saesolved.com
http://www.widgetchuck.com
http://www.sitewidgets.com

- PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in the body, not the subject, of your message.