Commit 9ea74546 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Reset password when removing local auth provider

parent 072b84a7
......@@ -737,8 +737,9 @@ class AstakosUserAuthProvider(models.Model):
def delete(self, *args, **kwargs):
ret = super(AstakosUserAuthProvider, self).delete(*args, **kwargs)
self.user.set_unusable_password()
self.user.save()
if self.module == 'local':
self.user.set_unusable_password()
self.user.save()
return ret
def __repr__(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment