From 5e883406fe712c631420caac1acaa1df3da287d2 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 6 Jul 2022 14:02:33 +0800 Subject: [PATCH] * Fix bug #24847. --- module/gitlab/control.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 564f183c93..6d4d3dc397 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -634,10 +634,17 @@ class gitlab extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseUser', "gitlabID=$gitlabID"))); } - $userPairs = $this->loadModel('user')->getPairs('noclosed|noletter'); $user = $this->gitlab->apiGetSingleUser($gitlabID, $userID); $zentaoBindAccount = $this->dao->select('account')->from(TABLE_OAUTH)->where('providerType')->eq('gitlab')->andWhere('providerID')->eq($gitlabID)->andWhere('openID')->eq($user->id)->fetch('account'); + $users = $this->loadModel('user')->getList(); + $bindedUsers = $this->gitlab->getUserAccountIdPairs($gitlabID); + $userPairs = array('' => ''); + foreach($users as $u) + { + if(!isset($bindedUsers[$u->account]) or $u->account == $zentaoBindAccount) $userPairs[$u->account] = $u->realname; + } + $this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->user->edit; $this->view->user = $user; $this->view->userPairs = $userPairs;