misc_pterodactyl-panel/app/Http/Requests/Api/Application/Users/GetUserRequest.php

21 lines
411 B
PHP
Raw Normal View History

2021-01-04 18:50:43 +00:00
<?php
namespace Pterodactyl\Http\Requests\Api\Application\Users;
use Pterodactyl\Models\User;
class GetUserRequest extends GetUsersRequest
{
/**
* Determine if the requested role exists on the Panel.
*
* @return bool
*/
public function resourceExists(): bool
{
$user = $this->route()->parameter('user');
return $user instanceof User && $user->exists;
}
}