This commit is contained in:
@@ -32,6 +32,7 @@ class Article extends Controller {
|
||||
protected $reviewer_from_author_obj = '';
|
||||
protected $article_dialog_obj = '';
|
||||
protected $article_proposal_obj = '';
|
||||
protected $user_black_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
@@ -56,6 +57,7 @@ class Article extends Controller {
|
||||
$this->reviewer_from_author_obj = Db::name("reviewer_from_author");
|
||||
$this->article_dialog_obj = Db::name('article_dialog');
|
||||
$this->article_proposal_obj = Db::name('article_proposal');
|
||||
$this->user_black_obj = Db::name('user_black');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1068,6 +1070,12 @@ class Article extends Controller {
|
||||
$data = $this->request->post();
|
||||
$user_res = $this->user_obj->where('account', $data['username'])->find();
|
||||
|
||||
//确定用户是否属于黑名单
|
||||
$black_check = $this->user_black_obj->where('user_id', $user_res['user_id'])->where('black_state', 0)->find();
|
||||
if ($black_check) {
|
||||
return jsonError("Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.");
|
||||
}
|
||||
|
||||
if($user_res['account']=='fariba'||$user_res['account']=='zc'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
|
||||
return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user