1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 16:36:15 +00:00

use get_emailuser_with_import when check if user exists (#4787)

Co-authored-by: lian <lian@seafile.com>
This commit is contained in:
lian
2021-01-13 21:34:40 +08:00
committed by GitHub
parent d75beba8bd
commit e7be08810a

View File

@@ -322,7 +322,7 @@ class User(object):
return True
def save(self):
emailuser = ccnet_threaded_rpc.get_emailuser(self.username)
emailuser = ccnet_api.get_emailuser_with_import(self.username)
if emailuser:
if not hasattr(self, 'password'):
self.set_unusable_password()
@@ -538,7 +538,7 @@ class User(object):
class AuthBackend(object):
def get_user_with_import(self, username):
emailuser = seaserv.get_emailuser_with_import(username)
emailuser = ccnet_api.get_emailuser_with_import(username)
if not emailuser:
raise User.DoesNotExist('User matching query does not exits.')