This is indeed expected as the auth cookie stores the user_name of the user to look it up when it cames back. As you changed the user_name to now look inside emails you will end having already logged in users which will be looked up for something like 'myusername' into email_addresses.
If you are using TurboGears 2.2 you can simply change the user lookup method inside app_cfg, otherwise you will have to override the authentication configuration. On Mon, Jul 9, 2012 at 6:28 PM, Christoph Zwerschke <[email protected]> wrote: > Am 09.07.2012 14:58, schrieb Tobias Bieniek: > >> I have a small problem in one of my projects using tg2. I've had a >> pretty standard User table and now I implemented email-based logins. I >> did this by adding base_config.sa_auth.translations.user_name = >> 'email_address' to the app_cfg.py. Unfortunatly this leads to some >> problems if users have existing sessions. > > > Just tried this with a quickstarted project but everything seems to work as > expected. Which TG version do you use? What exactly do you mean with "have > existing sessions"? How can we reproduce this? > > -- Christoph > > > > -- > 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. > -- 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.

