When a user has forgotten their password, I use 
django.contrib.auth.views.password_reset to send an email containing a 
temporary link. When the user follows that link, I use 
password_reset_confirm to let them set a new password. So far, so good.

But password_reset_confirm doesn't automatically log the user in – as a 
result, immediately after resetting their password the user has to enter it 
again in order to log in. Most users, I suspect, would find this to be 
obnoxious.

How could this be fixed? According to the auth 
documentation<https://docs.djangoproject.com/en/1.4/topics/auth/#how-to-log-a-user-in>,
 
I need to call authenticate() and login(). But where? I could supply my own 
SetPasswordForm subclass to password_reset_confirm, and make the calls in 
its save() method... except save() doesn't have access to the HttpRequest 
object that login() requires. Or I could define my own 
password_reset_complete view... but then I wouldn't have access to the 
username and password anymore. Are there other options?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/g3FZyP_IK2EJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to