misc_pterodactyl-panel/app/Http/Controllers/Api/Application/Users/ExternalUserController.php

23 lines
762 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Http\Controllers\Api\Application\Users;
use Pterodactyl\Transformers\Api\Application\UserTransformer;
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
use Pterodactyl\Http\Requests\Api\Application\Users\GetExternalUserRequest;
class ExternalUserController extends ApplicationApiController
{
/**
* Retrieve a specific user from the database using their external ID.
2021-03-05 17:03:12 +00:00
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function index(GetExternalUserRequest $request): array
{
return $this->fractal->item($request->getUserModel())
->transformWith($this->getTransformer(UserTransformer::class))
->toArray();
}
}