Browse Source

Merge pull request #1338 from NL66278/10.0-no-email-on-ldap-populate

[10.0][FIX] users_ldap_populate. No unneeded password reset message.
pull/1339/head
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
ceb53d3c65
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      users_ldap_populate/models/users_ldap.py

5
users_ldap_populate/models/users_ldap.py

@ -69,8 +69,9 @@ class CompanyLDAP(models.Model):
conf['ldap_filter'])
results = self.get_ldap_entry_dicts(conf)
for result in results:
user_id = self.get_or_create_user(
conf, result[1][login_attr][0], result)
user_id = self.with_context(
no_reset_password=True
).get_or_create_user(conf, result[1][login_attr][0], result)
# this happens if something goes wrong while creating the user
# or fetching information from ldap
if not user_id:

Loading…
Cancel
Save