Re: [phplib] Authenticating using an "external" form From: Anatole (varin <email protected>)
Date: 05/29/01

Thanks for the tip Klaus.

This is what I came up that seems to work:

page_open(array("sess" => "Session", "auth" => "Default_Auth"));

if(isset($username)) { // this would be present if a login is in progress
      $auth->auth["uid"]= "form"; // this is what auth seems to want
      $auth->start();
}
if ($auth->auth["uid"] == "nobody") {
      $auth->auth_loginform();
      exit;
}

Anybody have a different/better idea?

- Anatole

> That's because there's no $auth object yet when you call page_open(), so you
> need to do something before calling it. Try looking into the auth code and
> find out what it wants. I guess you should somehow imitate submission of the
> standard login form.
>
> -- Klaus.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>