From 79a0bf7ee2f92d231975ee7ba5601ca8ffe1af26 Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Thu, 9 Aug 2018 17:24:13 +0200 Subject: [PATCH] [FIX] users_ldap_populate. No unneeded password reset message. --- users_ldap_populate/models/users_ldap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/users_ldap_populate/models/users_ldap.py b/users_ldap_populate/models/users_ldap.py index 47e837d45..818d0291d 100644 --- a/users_ldap_populate/models/users_ldap.py +++ b/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: