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

24 lines
548 B
PHP
Raw Normal View History

<?php
2018-01-20 01:58:57 +00:00
namespace Pterodactyl\Http\Requests\Api\Application\Users;
use Pterodactyl\Models\User;
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
class StoreUserRequest extends ApplicationApiRequest
{
2018-02-04 21:38:38 +00:00
public function rules(array $rules = null): array
{
$rules = $rules ?? User::getRules();
2018-02-04 21:38:38 +00:00
2022-12-15 00:05:46 +00:00
return collect($rules)->only([
'external_id',
'email',
'username',
'password',
2022-12-15 00:05:46 +00:00
'admin_role_id',
'root_admin',
])->toArray();
}
}