Skip to content

Commit 2adbdb9

Browse files
Merge pull request #724 from Luci2015/v2
fix for #649
2 parents 4420398 + 00f132e commit 2adbdb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

user_sync/rules.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ def manage_strays(self, umapi_connectors):
635635
def get_commands(key):
636636
"""Given a user key, returns the umapi commands targeting that user"""
637637
id_type, username, domain = self.parse_user_key(key)
638-
if '@' in username and username in self.email_override:
639-
username = self.email_override[username]
638+
if '@' in username and username.lower() in self.email_override:
639+
username = self.email_override[username.lower()]
640640
return user_sync.connector.umapi.Commands(identity_type=id_type, username=username, domain=domain)
641641

642642
# do the secondary umapis first, in case we are deleting user accounts from the primary umapi at the end
@@ -981,8 +981,8 @@ def map_email_override(self, umapi_user):
981981
:return:
982982
"""
983983
email = umapi_user.get('email', '')
984-
username = umapi_user.get('username', '')
985-
if '@' in username and username != email:
984+
username = umapi_user.get('username', '').lower()
985+
if '@' in username and username != email.lower():
986986
self.email_override[username] = email
987987

988988
@staticmethod

0 commit comments

Comments
 (0)