Thursday, October 25, 2012

Re: Best way to detect if a user has changed password

Thanks for the answers, that was pretty much what I was expecting.  I haven't had a chance to test this yet but do you think it'll be as simple as just comparing the value with the previous value, seeing as the password field is (I assume) a bit different with it storing the hash rather than the plain text.

On Wednesday, 24 October 2012 22:23:15 UTC+1, Roarster wrote:
I'm running a Django 1.4 site and I have some operations I want to perform if a user changes their password.  I'm using the standard contrib.auth user accounts with the normal password_change view and I'm not sure if I should somehow hook into this view or if I should use a signal on post_save for the user.  If I do use the signal, is it possible to tell when the password has been changed?  I do feel that if I can use a signal this might be the best approach since it would handle any other password change mechanisms that I might add later without any extra work.

Does anyone have any ideas on the best way to do this?

--
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/-/zuDV99Z715wJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment