* Modify root token check.
This commit is contained in:
@@ -471,9 +471,10 @@ class gitlabModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function apiGetCurrentUser($host, $token)
|
||||
public function apiGetCurrentUser($host, $token, $rootCheck = false)
|
||||
{
|
||||
$host = rtrim($host, '/') . "/api/v4%s?private_token=$token";
|
||||
if($rootCheck) $host .= '&sudo=1';
|
||||
return $this->apiGet($host, '/user');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user