Browse Source

[FIX] users_ldap_populate. No unneeded password reset message.

pull/1338/head
Ronald Portier 6 years ago
parent
commit
79a0bf7ee2
  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']) conf['ldap_filter'])
results = self.get_ldap_entry_dicts(conf) results = self.get_ldap_entry_dicts(conf)
for result in results: 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 # this happens if something goes wrong while creating the user
# or fetching information from ldap # or fetching information from ldap
if not user_id: if not user_id:

Loading…
Cancel
Save