2018-01-12 04:49:46 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\API\Admin\Users;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\User;
|
|
|
|
|
2018-01-13 02:39:15 +00:00
|
|
|
class GetUserRequest extends GetUsersRequest
|
2018-01-12 04:49:46 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the requested user exists on the Panel.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function resourceExists(): bool
|
|
|
|
{
|
|
|
|
$user = $this->route()->parameter('user');
|
|
|
|
|
2018-01-13 02:39:15 +00:00
|
|
|
return $user instanceof User && $user->exists;
|
2018-01-12 04:49:46 +00:00
|
|
|
}
|
|
|
|
}
|