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:
Umair Khan 2016-10-28 17:41:07 +05:00
parent 78b1b80987
commit ccc1f3861f
1 changed files with 1 additions and 1 deletions

View File

@ -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):