mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-30 15:59:55 -05:00
Merge branch 'master' into refactoringTests
This commit is contained in:
@@ -750,4 +750,37 @@ class GraphHelper {
|
||||
|
||||
return HttpRequestHelper::sendRequest($url, '', 'PATCH', $user, $password, $header, $body);
|
||||
}
|
||||
|
||||
* @param string $baseUrl
|
||||
* @param string $xRequestId
|
||||
* @param string $user
|
||||
* @param string $password
|
||||
* @param string $currentPassword
|
||||
* @param string $newPassword
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public static function changeOwnPassword(
|
||||
string $baseUrl,
|
||||
string $xRequestId,
|
||||
string $user,
|
||||
string $password,
|
||||
string $currentPassword,
|
||||
string $newPassword
|
||||
): ResponseInterface {
|
||||
$url = self::getFullUrl($baseUrl, 'me/changePassword');
|
||||
$payload['currentPassword'] = $currentPassword;
|
||||
$payload['newPassword'] = $newPassword;
|
||||
|
||||
return HttpRequestHelper::sendRequest(
|
||||
$url,
|
||||
$xRequestId,
|
||||
"POST",
|
||||
$user,
|
||||
$password,
|
||||
self::getRequestHeaders(),
|
||||
\json_encode($payload)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user