2018-01-13 02:39:15 +00:00
|
|
|
<?php
|
|
|
|
|
2018-01-20 01:58:57 +00:00
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Users;
|
2018-01-13 02:39:15 +00:00
|
|
|
|
|
|
|
use Pterodactyl\Models\User;
|
|
|
|
|
|
|
|
class UpdateUserRequest extends StoreUserRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Return the validation rules for this request.
|
|
|
|
*/
|
2018-02-04 21:38:38 +00:00
|
|
|
public function rules(array $rules = null): array
|
2018-01-13 02:39:15 +00:00
|
|
|
{
|
2018-02-04 21:38:38 +00:00
|
|
|
$userId = $this->getModel(User::class)->id;
|
2018-01-13 02:39:15 +00:00
|
|
|
|
2019-09-05 05:26:28 +00:00
|
|
|
return parent::rules(User::getRulesForUpdate($userId));
|
2018-01-13 02:39:15 +00:00
|
|
|
}
|
|
|
|
}
|