mirror of https://github.com/zulip/zulip.git
Fix return value logic of ZulipLDAPAuthBackend.get_or_create_user.
The actual logic is that if the user already exists than the function should return a False and if the user does not exist the function should first create the user and return True.
This commit is contained in:
parent
78b1b80987
commit
ccc1f3861f
|
@ -316,7 +316,7 @@ class ZulipLDAPAuthBackend(ZulipLDAPAuthBackendBase):
|
|||
short_name = ldap_user.attrs[short_name_attr][0]
|
||||
|
||||
user_profile = do_create_user(username, None, realm, full_name, short_name)
|
||||
return user_profile, False
|
||||
return user_profile, True
|
||||
|
||||
# Just like ZulipLDAPAuthBackend, but doesn't let you log in.
|
||||
class ZulipLDAPUserPopulator(ZulipLDAPAuthBackendBase):
|
||||
|
|
Loading…
Reference in New Issue