Date: 01/08/00
- Next message: andre anneck: "Re: [PHPLIB] Undefined variable: _PHPLIB in prepend.php3"
- Previous message: eGroups.com Manager: "[PHPLIB] Welcome to the kamerun group"
- Next in thread: Tsing Zou: "Re: [PHPLIB] Default Authentication and user registration"
- Reply: Tsing Zou: "Re: [PHPLIB] Default Authentication and user registration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm trying to create a registration page that will automatically log the
user in as soon as they submit their registration information. I'm trying
to use default auth to create an auth object, which will then we used to
log the user in once they've submitted their information. Does this make
sense? I'm also having a problem with the default auth itself, it brings
up the login page before I'm able to see the registration page, that does
not seem correct to me at all, the code follows.
the code for the registration form page:
<?
page_open(array("sess" => "Example_Session", "auth" =>
"Example_Default_Auth"));
?>
<HTML>
<HEAD>
<TITLE>User Registration</TITLE>
...
code for entering info into the database as well as log the user in after
they submit their info:
<?
// Connect to database.
#page_open(array("sess" => "Example_Session"));
#page_open(array("sess" => "Example_Session", "auth" =>
"Example_Default_Auth", "perm" => "Example_Perm","user" =>
"Example_User"));
page_open(array("sess" => "Example_Session", "auth" =>
"Example_Default_Auth"));
... (unimportant stuff) ...
if ( $uid = $auth->auth_validatelogin() ) { # do the login
$auth->auth["uid"] = $uid; # copied from local.inc...
$auth->auth["exp"] = time() + (60 * $this->lifetime);
$auth->auth["refresh"] = time() + (60 * $this->refresh);
}
Afam Agbodike
-
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.
- Next message: andre anneck: "Re: [PHPLIB] Undefined variable: _PHPLIB in prepend.php3"
- Previous message: eGroups.com Manager: "[PHPLIB] Welcome to the kamerun group"
- Next in thread: Tsing Zou: "Re: [PHPLIB] Default Authentication and user registration"
- Reply: Tsing Zou: "Re: [PHPLIB] Default Authentication and user registration"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

