I'm using the identity framework in my webapp. I have a user
registration page that lets users sign up and I want automatically log
users in once they've signed up.
After much poking around in the identity source, I got the following
code to work:
ident = identity.current_provider.validate_identity(new_user_name,
password, turbogears.visit.current().key)
identity.set_current_identity(ident)
identity.set_current_provider(identity.current_provider)
Is there a cleaner way?
I just do:
identity.current_provider.validate_identity(user_name, password,
identity.current.visit_key)
Seems to work without the last 2 lines.
Regards -- Andy