mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-28 14:59:49 -05:00
Refactored and added test to get user information with GraphAPI
This commit is contained in:
@@ -181,6 +181,31 @@ class GraphHelper {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $baseUrl
|
||||
* @param string $xRequestId
|
||||
* @param string $user
|
||||
* @param string $userPassword
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public static function getUserInformation(
|
||||
string $baseUrl,
|
||||
string $xRequestId,
|
||||
string $user,
|
||||
string $userPassword
|
||||
): ResponseInterface {
|
||||
$url = self::getFullUrl($baseUrl, 'me/?%24expand=memberOf');
|
||||
return HttpRequestHelper::get(
|
||||
$url,
|
||||
$xRequestId,
|
||||
$user,
|
||||
$userPassword,
|
||||
self::getRequestHeaders()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $baseUrl
|
||||
* @param string $xRequestId
|
||||
|
||||
Reference in New Issue
Block a user