* Adjust code.

This commit is contained in:
z
2021-06-17 10:12:24 +08:00
parent 9c3c8022c9
commit 06c6deb1ea
3 changed files with 41 additions and 2 deletions
+14 -1
View File
@@ -97,7 +97,7 @@ class gitlabModel extends model
{
$api = rtrim($gitlab->url, '/') . '/api/v4/users?private_token=' . $gitlab->token;
$response = json_decode(commonModel::http($api));
if (!$response) return array();
$users = array();
@@ -194,6 +194,19 @@ class gitlabModel extends model
return $gitlab_url;
}
/**
* check if gitlab id exists
*
* @param string
* @access public
* @return array
*/
public function checkAccountId($openID,$providerID)
{
return $this->dao->select('openID')->from(TABLE_OAUTH)->where('openID')->eq($openID)->andWhere('providerID')->eq($providerID)->fetch('openID');
}
/**
* Get hooks.
*