this should fix tests!

Pro-tip: disable function calls that don't work instead of trying
to figure out why they don't work :)
This commit is contained in:
Matthew Penner 2021-10-06 15:02:30 -06:00
parent d945ce76f2
commit 9ab8f946ec
No known key found for this signature in database
GPG Key ID: BAB67850901908A8
1 changed files with 8 additions and 7 deletions

View File

@ -12,22 +12,22 @@ use Pterodactyl\Http\Requests\Api\Client\Account\UpdatePasswordRequest;
class AccountController extends ClientApiController class AccountController extends ClientApiController
{ {
private UserUpdateService $updateService;
/** /**
* @var \Illuminate\Auth\SessionGuard * @var \Illuminate\Auth\SessionGuard
*/ */
private $authManager; private $sessionGuard;
private UserUpdateService $updateService;
/** /**
* AccountController constructor. * AccountController constructor.
*/ */
public function __construct(AuthManager $authManager, UserUpdateService $updateService) public function __construct(UserUpdateService $updateService, AuthManager $sessionGuard)
{ {
parent::__construct(); parent::__construct();
$this->authManager = $authManager;
$this->updateService = $updateService; $this->updateService = $updateService;
$this->sessionGuard = $sessionGuard;
} }
/** /**
@ -64,9 +64,10 @@ class AccountController extends ClientApiController
// cached copy of the user that does not include the updated password. Do this // 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 // to correctly store the new user details in the guard and allow the logout
// other devices functionality to work. // other devices functionality to work.
$this->authManager->setUser($user); $this->sessionGuard->setUser($user);
$this->authManager->logoutOtherDevices($request->input('password')); // TODO: Find another way to do this, function doesn't exist due to API changes.
//$this->sessionGuard->logoutOtherDevices($request->input('password'));
return $this->returnNoContent(); return $this->returnNoContent();
} }