Browse Source

Add email address to LDAP (for Sympa login)

Baptiste Jonglez 10 years ago
parent
commit
a775f3ebbd
1 changed files with 4 additions and 0 deletions
  1. 4 0
      coin/members/models.py

+ 4 - 0
coin/members/models.py

@@ -217,6 +217,7 @@ class Member(CoinLdapSyncMixin, AbstractUser):
             # Make sure password is hashed
             ldap_user.password = utils.ldap_hash(self._password_ldap)
 
+        ldap_user.mail = self.email
         # Store SSH keys
         ldap_user.sshPublicKey = self.get_ssh_keys()
 
@@ -402,6 +403,9 @@ class LdapUser(ldapdb.models.Model):
     password = CharField(db_column=b'userPassword', max_length=255)
     uidNumber = IntegerField(db_column=b'uidNumber', unique=True)
     gidNumber = IntegerField(db_column=b'gidNumber', default=2000)
+    # Used by Sympa for logging in.
+    mail = CharField(db_column=b'mail', max_length=255, blank=True,
+                     unique=True)
     homeDirectory = CharField(db_column=b'homeDirectory', max_length=255,
                               default='/tmp')
     loginShell = CharField(db_column=b'loginShell', max_length=255,