[ic] Use E-Mail Address Instead Of Username For Login

Jeff Dafoe interchange-users@icdevgroup.org
Sat Oct 12 23:51:02 2002


> I need to modify the registration form so they don't specify their
> username. Instead, they specify their e-mail address and their password
> on the registration form.
>
> I am assuming that I will need to have the system to assign a user id to
> their account automatically so it's used as a unique identifier for
> their account.

    A client I am doing work for wanted the same thing, but we can't do it
within his time frame.  I don't know if there is an easier way, but here is
how I was thinking of approaching it:

1) At signup, assign the user a default sequential userid (like that
autosave thing in the checkout page does).  Don't expose this username to
the user.  Make changes to signup and account edit page so that email
address has to be unique.
2) Modify the login page so it does the lookup by email address and
retrieves the associated username and logs the user in.
3) Modify the half-dozen templates that display the username to the user to
instead display the email.

    So basically you end up with a system that has a username under the hood
but never exposes it to the user.


Jeff