Debug LDAP
This commit is contained in:
parent
17dedf6078
commit
5e58c7b59d
1 changed files with 2 additions and 2 deletions
|
@ -66,11 +66,11 @@ def create_user_profile(sender, instance, created, **kwargs):
|
||||||
dirs = infos['homeDirectory'][0].split('/')
|
dirs = infos['homeDirectory'][0].split('/')
|
||||||
if dirs[1] == 'users':
|
if dirs[1] == 'users':
|
||||||
annee = dirs[2]
|
annee = dirs[2]
|
||||||
dep = dirs[4]
|
dep = dirs[3]
|
||||||
dep = dict(DEPARTEMENTS_DEFAUT).get(dep.lower(), '')
|
dep = dict(DEPARTEMENTS_DEFAUT).get(dep.lower(), '')
|
||||||
profil.promotion = u'%s %s' % (dep, annee)
|
profil.promotion = u'%s %s' % (dep, annee)
|
||||||
pmail = infos.get('mailRoutingAddress',
|
pmail = infos.get('mailRoutingAddress',
|
||||||
['%s@clipper.ens.fr'%instance.username])
|
['%s@clipper.ens.fr'%instance.username])
|
||||||
if len(pmail) > 0:
|
if len(pmail) > 0:
|
||||||
profil.mail = pmail[0]
|
profil.mail = pmail[0]
|
||||||
profil.save()
|
profil.save()
|
||||||
|
|
Loading…
Reference in a new issue