Merge branch 'develop' into v2
This commit is contained in:
commit
b26556e201
12 changed files with 59 additions and 51 deletions
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue