Skip to content

Commit

Permalink
ldap: Use zulip.ldap logger in ZulipLDAPUserPopulator.
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszmandera authored and timabbott committed Jul 20, 2020
1 parent 1696c9a commit 82660de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zproject/backends.py
Expand Up @@ -797,14 +797,14 @@ def get_or_build_user(self, username: str,
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)
Expand Down

0 comments on commit 82660de

Please sign in to comment.