Convert usernames to lowercase
authorDan Scott <dscott@laurentian.ca>
Thu, 11 Sep 2014 02:31:52 +0000 (22:31 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 11 Sep 2014 02:31:52 +0000 (22:31 -0400)
As our LDAP authentication is using all lowercase, we should
be generating accounts in the database in all lowercase too.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/patron-load/ldap_osrf_sync

index cf3c9b8..9a1c134 100755 (executable)
@@ -85,9 +85,9 @@ class User:
 
         if 'mail' not in self.ldap_atts:
             if self.lang_pref and self.lang_pref == 'f':
-                self.email = self.cn + '@laurentienne.ca'
+                self.email = (self.cn + '@laurentienne.ca').lower()
             else:
-                self.email = self.cn + '@laurentian.ca'
+                self.email = (self.cn + '@laurentian.ca').lower()
             print >> sys.stderr, '"mail" not found for %s, using %s' % (self.cn, self.email)
             # return None
         else: