mirror of https://github.com/zulip/zulip.git
backends: Early return in sync_avatar_from_ldap.
This commit is contained in:
parent
0153d6dbcd
commit
b36ad31f0e
|
@ -807,7 +807,9 @@ class ZulipLDAPAuthBackendBase(ZulipAuthMixin, LDAPBackend):
|
|||
return username
|
||||
|
||||
def sync_avatar_from_ldap(self, user: UserProfile, ldap_user: _LDAPUser) -> None:
|
||||
if "avatar" in settings.AUTH_LDAP_USER_ATTR_MAP:
|
||||
if "avatar" not in settings.AUTH_LDAP_USER_ATTR_MAP:
|
||||
return
|
||||
|
||||
# We do local imports here to avoid import loops
|
||||
from io import BytesIO
|
||||
|
||||
|
|
Loading…
Reference in New Issue