From 5711890a9cfe66c2688d01f26f73f714ffe30fc0 Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Tue, 22 Mar 2022 16:52:40 +0800 Subject: [PATCH 1/2] *Fix api for user. --- api/v1/entries/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/entries/user.php b/api/v1/entries/user.php index 4ea73eff23..05d9086748 100644 --- a/api/v1/entries/user.php +++ b/api/v1/entries/user.php @@ -61,7 +61,7 @@ class userEntry extends Entry $info->profile = $this->format($profile, 'last:time,locked:time,birthday:date,join:date'); $info->profile->role = array('code' => $info->profile->role, 'name' => $this->lang->user->roleList[$info->profile->role]); $info->profile->admin = strpos($this->app->company->admins, ",{$profile->account},") !== false; - $info->profile->superReviewer = strpos(',' . trim(zget($this->config->story, 'superReviewers', ''), ',') . ',', ',' . $this->app->user->account . ','); + $info->profile->superReviewer = isset($this->config->story) ? strpos(',' . trim(zget($this->config->story, 'superReviewers', ''), ',') . ',', ',' . $this->app->user->account . ',') :false; if(!$fields) return $this->send(200, $info); From 896b9c9b38476d1dff0537a37dba6b906cb118ec Mon Sep 17 00:00:00 2001 From: zhengrunyu Date: Tue, 22 Mar 2022 16:55:59 +0800 Subject: [PATCH 2/2] *Add blank. --- api/v1/entries/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/entries/user.php b/api/v1/entries/user.php index 05d9086748..6343fcea1b 100644 --- a/api/v1/entries/user.php +++ b/api/v1/entries/user.php @@ -61,7 +61,7 @@ class userEntry extends Entry $info->profile = $this->format($profile, 'last:time,locked:time,birthday:date,join:date'); $info->profile->role = array('code' => $info->profile->role, 'name' => $this->lang->user->roleList[$info->profile->role]); $info->profile->admin = strpos($this->app->company->admins, ",{$profile->account},") !== false; - $info->profile->superReviewer = isset($this->config->story) ? strpos(',' . trim(zget($this->config->story, 'superReviewers', ''), ',') . ',', ',' . $this->app->user->account . ',') :false; + $info->profile->superReviewer = isset($this->config->story) ? strpos(',' . trim(zget($this->config->story, 'superReviewers', ''), ',') . ',', ',' . $this->app->user->account . ',') : false; if(!$fields) return $this->send(200, $info);