This commit is contained in:
Administrator
2022-03-25 15:42:31 +08:00
parent 44cbb62a4e
commit 98f1944b39
4 changed files with 347 additions and 184 deletions

View File

@@ -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.']);
}