From d6cf422643bb9f042a16347110d918d40495d3e3 Mon Sep 17 00:00:00 2001 From: xiaomaoxue <1131274737@qq.com> Date: Wed, 18 Apr 2018 13:35:16 +0800 Subject: [PATCH] =?UTF-8?q?[bugfix]=20=E4=BF=AE=E5=A4=8D=E9=9D=9Eldap?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=97=B6=E7=9A=84=E4=B8=80=E4=B8=AA=E5=B0=8F?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/users/forms.py b/apps/users/forms.py index 99950e8..8ed4884 100644 --- a/apps/users/forms.py +++ b/apps/users/forms.py @@ -269,13 +269,13 @@ def clean_confirm_password(self): return confirm_password def save(self): - ldap_tool = LDAPTool() username = self.instance.username password = self.cleaned_data['new_password'] self.instance.set_password(password) self.instance.save() # ldap用户 if settings.AUTH_LDAP and self.instance.is_ldap_user: + ldap_tool = LDAPTool() status = ldap_tool.ldap_update_password(username, new_password=password) if status: return self.instance