Merge branch 'develop' into v2

This commit is contained in:
Matthew Penner 2021-08-21 12:50:51 -06:00
commit b26556e201
No known key found for this signature in database
GPG key ID: 5396CC4C3C1C9704
12 changed files with 59 additions and 51 deletions

View file

@ -55,12 +55,17 @@ class AccountController extends ClientApiController
* Update the authenticated user's password. All existing sessions will be logged
* out immediately.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \Throwable
*/
public function updatePassword(UpdatePasswordRequest $request): Response
{
$this->updateService->handle($request->user(), $request->validated());
$user = $this->updateService->handle($request->user(), $request->validated());
// If you do not update the user in the session you'll end up working with a
// cached copy of the user that does not include the updated password. Do this
// to correctly store the new user details in the guard and allow the logout
// other devices functionality to work.
$this->sessionGuard->setUser($user);
$this->authManager->logoutOtherDevices($request->input('password'));

View file

@ -32,7 +32,6 @@ class ResourceUtilizationController extends ClientApiController
* a flood of unnecessary API calls.
*
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function __invoke(GetServerRequest $request, Server $server): array
{