If you are referring to this code:

    def login(self,username,password):
        ident = tg.identity.current_provider.validate_identity(
                 username, password, cherrypy.request.tg_visit.key)
        if ident:
            result = 'ok'
        else:
            # credentials weren't valid, so user is anonymous
            ident = tg.identity.current_provider.anonymous_identity()
            result = 'invalid login'
        # manually set identity in case we
        # want to use it elsewhere in this request
        tg.identity.set_current_identity(ident)
        return result

then, no, I haven't tried it yet, but I now have this high on my todo
list.
Thanks, I'll let you know ASAP.
Jesse


On Feb 28, 7:58 am, "Patrick Lewis" <[EMAIL PROTECTED]> wrote:
> On Feb 27, 9:50 pm, "Jesse James" <[EMAIL PROTECTED]> wrote:
>
> > ok. now I'm still basically as confused as I was before.
> > I'm having an 'identity crisis' ... sorry, couldn't resist. :-)
>
> > So, we have established that Rick could not seem to get the identity
> > assignment to 'stick' without the code he presented.
> > Is that the general consensus ???
>
> > my original question remains:
> > How should I properly log in a user without the boiler plate login
> > template?
>
> I think my PasteBin code (in this thread) should work, as well as
> Rick's code (if you can get a User object).
>
> Have you tried either of these and had problems?


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