Hey there,

I simply used the user_name attribute of the user table with the
user's email address, instead of the user name itself. You can
basically extend the table as much as you want, but you need to make
sure that you leave at least user_id and user_name in there (if i am
not mistaken, you will find this same information also in the sources
of the quickstarted project, near the auth).

You can add another field as my_user_name or something to save the
actual name of the user, and use user_name for your email instead of
the login. I think this behaviour is hardcoded, but I am not certain.
you can configure a lot of stuff like

# login_url (str) – The URL where the login form is displayed.
# login_handler (str) – The URL where the login form is submitted.
# post_login_url (str) – The URL/path where users should be redirected
to after login.
# logout_handler – The URL where the logout is handled.
# post_logout_url (str) – The URL/path where users should be
redirected to after logout.
# login_counter_name (str) – The name of the variable in the query
string that represents the login counter; defaults to __logins.

(taken from http://code.gustavonarea.net/repoze.what-quickstart/ ) but
the table descriptions are not among them. You could also go with
defining an sqlalchemy synonym (see the password part of the user
mapped class in auth.py how thats done) to "bend" the behaviour a
little bit.

Greetings,

Tom

On Mon, Oct 5, 2009 at 7:14 PM, xianren <[email protected]> wrote:
>
> Hi,
>
> I used the login feature of repoze.who in TG2 generated from
> quickstart command. Now, in my project, I need to use the email
> address of user to authenticate whether user is valid and then let him/
> her has longin identity.
>
> I found that login form of repoze.who submit the data to /
> login_handler, but I have not found where I can customize it.
>
> Is there any way I can implement this feature?
>
> Thanks in advance.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to