From c41357a607659099be05c5ada092cf343b08560c Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 15 Dec 2010 21:24:26 +0000 Subject: allow to use email on log on transifex --- modules/transifex/files/custom_backend.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 modules/transifex/files/custom_backend.py (limited to 'modules/transifex/files/custom_backend.py') diff --git a/modules/transifex/files/custom_backend.py b/modules/transifex/files/custom_backend.py new file mode 100644 index 00000000..828744fb --- /dev/null +++ b/modules/transifex/files/custom_backend.py @@ -0,0 +1,9 @@ + +from django_auth_ldap.backend import LDAPBackend,_LDAPUser + +class ForceUidLDAPBackend(LDAPBackend): + def ldap_to_django_username(self, username): + # force uid if someone give a email + return _LDAPUser(self, username=username).attrs['uid'][0] + + -- cgit v1.2.1