Permalink
Browse files

upgrade django-auth-ldap and fix depreciated warning

  • Loading branch information...
fyfe committed Dec 17, 2017
1 parent 0cd444b commit 2e18acb8ad251ddcf2f4b2a6afe975f5110df844
Showing with 4 additions and 4 deletions.
  1. +1 −1 ldap-requirements.txt
  2. +3 −3 modoboa/lib/authbackends.py
View
@@ -1 +1 @@
django-auth-ldap>=1.2.13
django-auth-ldap>=1.3.0
@@ -29,9 +29,9 @@ def authenticate(self, username=None, password=None):
smtp.login(username, password)
except smtplib.SMTPException:
return None
return self.get_or_create_user(username)
return self.get_or_build_user(username)
def get_or_create_user(self, username):
def get_or_build_user(self, username):
"""Get a user or create it the first time.
.. note::
@@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs):
self.global_params = dict(
param_tools.get_global_parameters("core"))
def get_or_create_user(self, username, ldap_user):
def get_or_build_user(self, username, ldap_user):
"""
This must return a (User, created) 2-tuple for the given
LDAP user. username is the Django-friendly username of

0 comments on commit 2e18acb

Please sign in to comment.