[SOGo] On patche un peu partout pour pouvoir rendre le champ mail de ldap plus propre.
Ignore-this: aed0fb0c7f88d3feb1f0be35b11780bf darcs-hash:20121201132852-b6762-f77d73b568bc1ad0fef3c9341cb2a00a34a09a0c.gz
This commit is contained in:
parent
e6777ccb12
commit
ab6202f37c
5 changed files with 21 additions and 14 deletions
|
@ -2113,7 +2113,11 @@ class Adherent(BaseProprietaire):
|
|||
|
||||
def mail(self, new=None):
|
||||
if new == None:
|
||||
return decode(self._data.get('mail', [''])[0])
|
||||
email = self._data.get('mail', [''])[0]
|
||||
if not '@' in email:
|
||||
return decode(email)+'@crans.org'
|
||||
else:
|
||||
return decode(email)
|
||||
|
||||
new = validate_mail(new)
|
||||
|
||||
|
@ -2299,10 +2303,7 @@ class Adherent(BaseProprietaire):
|
|||
Si login = None, retourne le compte de l'adhérent
|
||||
"""
|
||||
if not login:
|
||||
if self.mail().find('@') != -1:
|
||||
return ''
|
||||
else:
|
||||
return self.mail()
|
||||
return self._data.get('uid', [''])[0]
|
||||
|
||||
# Supression des accents et espaces
|
||||
login = strip_accents(login)
|
||||
|
@ -2343,6 +2344,7 @@ class Adherent(BaseProprietaire):
|
|||
# Lock du mail
|
||||
self.lock('mail', login)
|
||||
|
||||
# SOGO IS HUNGRY (modifier [login] en ["%s@crans.org"%(login)] quand tout sera ok)
|
||||
self._data['mail'] = [login]
|
||||
if not 'compte' in self.modifs:
|
||||
self.modifs.setdefault('compte', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue