+ Add get account name in zentaopms.

This commit is contained in:
dingguodong
2021-06-22 15:10:58 +08:00
parent 7514cf80e3
commit 5a36acb96e
+20
View File
@@ -648,4 +648,24 @@ class gitlabModel extends model
{
}
/**
* Get account name in zentao sys.
*
* @param int $gitlabID
* @param int $userID
* @access public
* @return string|false
*/
public function getAccountName($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;
}
}