Chris Moffitt wrote:
> >
> I've was tripped up by this too.  Can you try something like this:
>
>       user = authenticate(username=data[*'user_name'*], 
> password=data[*'password'*])
>       login(request, user)
>
> This seems to work for me.  If you want to see the full code, it's here -
> http://satchmo.python-hosting.com/file/trunk/satchmo/shop/views/account.py
>
> -Chris

Thanks Chris, I tried this. The problem is that a that particular line
I don't have access to the 'real ' password. In my app, the user
registers by choosing a username and password and email, the password
gets encrypted, and all values are stored. Then, the user press an
activation link in the received confirmation email. In the confirm
view, the user status gets updated to active, and then I want to
perform a login. Maybe, I have to authenticate just before the login
method call, but I don't have access to an unencrypted password there.
Does anyone know of a way to login a user without having to
authenticate first? Or authenticating with an encrypted password?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to