From 4e3153c5504e699784f9bf715d81ea4bc8a0fafe Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 29 Sep 2016 04:12:36 +0200 Subject: models: Remove unused attribute --- accounts/backend/user/ldap.py | 3 +-- accounts/models.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/accounts/backend/user/ldap.py b/accounts/backend/user/ldap.py index ed7b792..6ab02c6 100644 --- a/accounts/backend/user/ldap.py +++ b/accounts/backend/user/ldap.py @@ -64,7 +64,7 @@ class LdapBackend(Backend): if uid is None or mail is None: raise NoSuchUserError("User not found") - return Account(uid, mail, services, user_dn, password) + return Account(uid, mail, services, password) def find(self, filters=None, wildcard=False): """ @@ -108,7 +108,6 @@ class LdapBackend(Backend): } conn.add(user_dn, attributes=attrs) - account.dn = user_dn account.new_password_root = (None, account.password) self._alter_passwords(conn, account) diff --git a/accounts/models.py b/accounts/models.py index 0fdc1f7..6bb4bf4 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -12,10 +12,9 @@ class Account(UserMixin): """ _ready = False - def __init__(self, uid, mail, services=None, dn=None, password=None): + def __init__(self, uid, mail, services=None, password=None): self.uid = uid.encode('utf8') if isinstance(uid, unicode) else uid self.services = list() if services is None else services - self.dn = dn self.password = password.encode('utf8') if isinstance(password, unicode) else password self.new_password_root = None self.new_password_services = {} -- cgit v1.2.3-1-g7c22