backends: ldap attributes are list, take the first value for email
This commit is contained in:
parent
a22d107ae7
commit
2a313c7295
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION=0.14
|
||||
VERSION=0.15
|
||||
|
||||
package:
|
||||
git archive -o ../appli-logement-$(VERSION).tar --prefix=appli-logement-$(VERSION)/ HEAD
|
||||
|
|
|
@ -124,8 +124,8 @@ class ProfilRechercheAuthentification(ProfilMoteurAuthentification):
|
|||
def creation_du_compte(self, identifiant, cas_url, ldap_resultat):
|
||||
'''Création de compte depuis le LDAP
|
||||
'''
|
||||
email = ldap_resultat[0][1].get(self.MAIL)
|
||||
email = email or ldap_resultat[0][1].get(self.SUPANN_MAIL_PERSO)
|
||||
email = ldap_resultat[0][1].get(self.MAIL, [''])[0]
|
||||
email = email or ldap_resultat[0][1].get(self.SUPANN_MAIL_PERSO, [''])[0]
|
||||
email = email or ''
|
||||
return self.profil_classe.new_cas_user(identifiant, email, cas_url)
|
||||
|
||||
|
|
Reference in New Issue