Skip to content

Commit e01509b

Browse files
authored
Merge pull request #241 from bhunut-adobe/v2
Set domain from email when domain is not specified
2 parents 8d0c11b + f1dcb0f commit e01509b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

user_sync/connector/directory_ldap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ def iter_users(self, users_filter, extended_attributes):
254254
source_attributes['domain'] = domain
255255
if domain:
256256
user['domain'] = domain
257+
elif username != email:
258+
user['domain'] = email[email.find('@') + 1:]
257259
elif last_attribute_name:
258260
self.logger.warning('No domain attribute (%s) for user with dn: %s', last_attribute_name, dn)
259261

0 commit comments

Comments
 (0)