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:
@@ -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.')
|
||||
|
||||
|
Reference in New Issue
Block a user