mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 01:44:13 +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
|
return True
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
emailuser = ccnet_threaded_rpc.get_emailuser(self.username)
|
emailuser = ccnet_api.get_emailuser_with_import(self.username)
|
||||||
if emailuser:
|
if emailuser:
|
||||||
if not hasattr(self, 'password'):
|
if not hasattr(self, 'password'):
|
||||||
self.set_unusable_password()
|
self.set_unusable_password()
|
||||||
@@ -538,7 +538,7 @@ class User(object):
|
|||||||
class AuthBackend(object):
|
class AuthBackend(object):
|
||||||
|
|
||||||
def get_user_with_import(self, username):
|
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:
|
if not emailuser:
|
||||||
raise User.DoesNotExist('User matching query does not exits.')
|
raise User.DoesNotExist('User matching query does not exits.')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user