On 5/18/06, mgaiman <[EMAIL PROTECTED]> wrote:
> 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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to