* Finish task#44402

This commit is contained in:
zenggang
2021-11-19 08:19:21 +00:00
parent 15ce4de1e4
commit 7c6a0b0e4e
6 changed files with 35 additions and 16 deletions

View File

@@ -115,6 +115,22 @@ class gitlabModel extends model
->fetchPairs();
}
/**
* 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');
}
/**
* Get project pairs of one gitlab.
*