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

34 lines
771 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
$response = collect($rules)->only([
'external_id',
'email',
'username',
'password',
'language',
'admin_role_id',
])->toArray();
2018-02-04 21:38:38 +00:00
return $response;
}
2021-01-24 01:17:35 +00:00
public function attributes(): array
{
return [
'external_id' => 'Third Party Identifier',
'root_admin' => 'Root Administrator Status',
];
}
}