Thanks Paul,
I have tried this on the Django shell and works for me as well.
Since I am using some third party software to do social site
authentication I might have made a mistake and not accessed the actual
django user object.
Thanks once again.
nav
On Friday 21 September 2012 03:17 PM, Paul Backhouse wrote:
Works for me...
from django.contrib.auth.models import User
user = User.objects.latest('id')
user.has_usable_password()
True
user.set_unusable_password()
user.has_usable_password()
False
On Thu, 2012-09-20 at 23:16 -0700, nav wrote:
Hi,
Is there any way to set the password of an existing user to and
unusable value like none?
I tried user.set_unusable_password() and subsequently user.save() but
this did not work.
Other than using this method is there a way to set the password to
None or such like so that the user.has_usable_password() method will
return False instead of True?
Many Thanks,
nav
--
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/-/yqNmZJR5mJgJ.
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.
--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.