We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 480303f commit b641b88Copy full SHA for b641b88
m3_sync.py
@@ -189,8 +189,12 @@ def main(self):
189
email = getattr(
190
self.ldap.entries[0], self.sync['mail_attr']).value
191
192
- if 'replace_mail_domain' in self.sync and self.sync['replace_mail_domain']:
193
- email = re.sub(r'@.*?$', '@{}'.format(self.sync['replace_mail_domain']), email)
+ if not email:
+ self.logger.warning('LDAP data for {}, is not an email or it doesn\'t has email attribute'.format(dn))
194
+ continue
195
+
196
+ if 'replace_mail_domain' in self.sync and self.sync['replace_mail_domain']:
197
+ email = re.sub(r'@.*?$', '@{}'.format(self.sync['replace_mail_domain']), email)
198
199
# lower case the email
200
ldap_data[self.get_list(list_name)][attr].append(
0 commit comments