Re: [phplib] Alternate Login Method From: Greg Speed (gspeed <email protected>)
Date: 11/14/00

Yes, I finally got it working.

Put this at the top of the page:

<%
page_open( array("sess" => "Example_Session", "auth" =>
"Example_Default_Auth", "perm" => "Example_Perm"));
%>
<%
if (!$auth->is_authenticated() || $auth->auth["uid"] == "nobody") {
 $uid = $auth->auth["uid"];
 if( $uid = $auth->auth_validatelogin() ) {
  $auth->auth["uid"] = $uid;
  $auth->auth["exp"] = time() + (60 * $auth->lifetime);
  $auth->auth["refresh"] = time() + (60 * $auth->refresh);
 }
}
%>

And put this down where you want the login to go:

<%
if (!$auth->is_authenticated() || $auth->auth["uid"] == "nobody") {
%>
<form method="POST" action="<%print $auth->url()%>">
Username:<br>
<input type="text" name="username" size="8"><br>
Password:<br>
<input type="password" name="password" size="8"><br>
<input type="submit" value="Login" name="login">
</form>
<%
}
%>

Greg Speed

Speedsoft.com
"The Most Affordable Hosting on the 'Net!"
----- Original Message -----
From: "Bogdan Morar" <bogmor <email protected>>
To: "Greg Speed" <gspeed <email protected>>
Sent: Tuesday, November 14, 2000 7:43 AM
Subject: Re: [phplib] Alternate Login Method

> I have the same problem, do you have a solution?
>
> Bogdan
>
> Greg Speed wrote:
>
> > I am the webmaster for SingleRose.com. I have PHP-lib-7.2c on the site
and
> > it is running great. However, I need to be able to put a "username"
> > and "password" field on my home page, to allow visitors to login from
the
> > home page instead of calling "login_if" and displaying the login page.
I
> > think auth_preauth is supposed to do this somehow, but I can't figure
out
> > how. Are there any examples of how this would work or can you tell me?
> >
> > I appreciate it!
> >
> > PS. I'm also using this on www.edspot.com/members
> >
> > Greg Speed
> >
> > Speedsoft.com
> > "The Most Affordable Hosting on the 'Net!"
> >
> > ---------------------------------------------------------------------
> > 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>