Re: [PHPLIB] Self registration From: Kristian Köhntopp (kk <email protected>)
Date: 10/29/99

Massimiliano Masserelli wrote:
> I don't want to rely on cookies, here in Italy they've been demonized a
> lot.

If you want to offer access to a protected area with a drop-in form
as Auth does and if you want to present either the login form or
the registration form, you have to decide if the user has seen your
site before. A cookie is the only mechanism to allow that. This is
how reg mode operates.

Alternatively you can use a page with default authentication and
a separate registration page accessible to everybody. That way you
will present default content to unregistered users and offer them
a location to go to for registration. This is standard form stuff
and needs no special support from Auth. After a user completes the
registration successfully, you should add the users credentials to
your session manually, and Auth should offer a method to do that
($auth->authenticate($uid)). This function is missing and should
be written, so that you can terminate your own registration form
like

if (validate_form()) {
  $uid = create_user();
  $auth = new Example_Auth;
  $auth->authenticate($uid);
}

Kristian

-- 
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.netuse.de/ (We have moved! Update your bookmarks!)
-
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.