Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ldap: Use zulip.ldap logger in ZulipLDAPUserPopulator.

Mateusz Mandera82660de59155
diff --git a/zproject/backends.py b/zproject/backends.py
index 4d201737fed..f37ad001d2c 100644
--- a/zproject/backends.py
+++ b/zproject/backends.py
@@ -797,14 +797,14 @@ class ZulipLDAPUserPopulator(ZulipLDAPAuthBackendBase):
user_disabled_in_ldap = self.is_account_control_disabled_user(ldap_user)
if user_disabled_in_ldap:
if user.is_active:
- logging.info("Deactivating user %s because they are disabled in LDAP.",
- user.delivery_email)
+ ldap_logger.info("Deactivating user %s because they are disabled in LDAP.",
+ user.delivery_email)
do_deactivate_user(user)
# Do an early return to avoid trying to sync additional data.
return (user, built)
elif not user.is_active:
- logging.info("Reactivating user %s because they are not disabled in LDAP.",
- user.delivery_email)
+ ldap_logger.info("Reactivating user %s because they are not disabled in LDAP.",
+ user.delivery_email)
do_reactivate_user(user)
self.sync_avatar_from_ldap(user, ldap_user)