From ffa7de4e72e0839fd9850df200dafe6135606316 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 22 Jun 2021 16:09:16 +0800 Subject: [PATCH 1/2] * Rename func for getting account in zentaopms and etc. --- module/gitlab/model.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 2fd8bf87a9..0184bff48c 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -650,22 +650,20 @@ class gitlabModel extends model } /** - * Get account name in zentao sys. + * Get account in zentaopms. * * @param int $gitlabID * @param int $userID * @access public * @return string|false */ - public function getAccountName($gitlabID, $userID) + public function getAccount($gitlabID, $userID) { - $account = $this->dao->select("account") - ->from(TABLE_OAUTH) - ->where('providerType')->eq('gitlab') - ->andwhere('providerID')->eq($gitlabID) - ->andwhere('openID')->eq($userID) - ->fetch(); - if(!dao::isError()) return $account->account; - return false; + retrun $this->dao->select('account') + ->from(TABLE_OAUTH) + ->where('providerType')->eq('gitlab') + ->andwhere('providerID')->eq($gitlabID) + ->andwhere('openID')->eq($userID) + ->fetch('account'); } } From 7975f38ecaf2fdc2653624d21da8e03448611191 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 22 Jun 2021 16:10:11 +0800 Subject: [PATCH 2/2] * Corrent bad spells for getting account in zentaopms and etc. --- module/gitlab/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 0184bff48c..1faf64c76b 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -659,7 +659,7 @@ class gitlabModel extends model */ public function getAccount($gitlabID, $userID) { - retrun $this->dao->select('account') + return $this->dao->select('account') ->from(TABLE_OAUTH) ->where('providerType')->eq('gitlab') ->andwhere('providerID')->eq($gitlabID)