* Adjust gitlab code.

This commit is contained in:
zenggang
2023-12-16 10:23:16 +00:00
parent fb853c091e
commit a7f019c0df
8 changed files with 29 additions and 13 deletions
+16
View File
@@ -88,6 +88,22 @@ class gitlabModel extends model
return rtrim($gitlab->url, '/') . '/api/v4%s' . "?private_token={$gitlab->token}" . $sudoParam;
}
/**
* Get gitlab user id by zentao account.
*
* @param int $gitlabID
* @access public
* @return array
*/
public function getUserIDByZentaoAccount($gitlabID, $zentaoAccount)
{
return $this->dao->select('openID')->from(TABLE_OAUTH)
->where('providerType')->eq('gitlab')
->andWhere('providerID')->eq($gitlabID)
->andWhere('account')->eq($zentaoAccount)
->fetch('openID');
}
/**
* 获取gitlab的用户id和真实名字的键值对。
* Get gitlab user id and realname pairs of one gitlab.