Fix form requests
This commit is contained in:
parent
c6cece51ee
commit
631b5eb1b2
2 changed files with 2 additions and 12 deletions
|
@ -44,9 +44,6 @@ abstract class AdminFormRequest extends FormRequest
|
||||||
*/
|
*/
|
||||||
public function normalize($only = [])
|
public function normalize($only = [])
|
||||||
{
|
{
|
||||||
return array_merge(
|
return $this->all(empty($only) ? array_keys($this->rules()) : $only);
|
||||||
$this->only($only),
|
|
||||||
$this->intersect(array_keys($this->rules()))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* Pterodactyl - Panel
|
|
||||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
|
||||||
*
|
|
||||||
* This software is licensed under the terms of the MIT license.
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Pterodactyl\Http\Requests\Admin;
|
namespace Pterodactyl\Http\Requests\Admin;
|
||||||
|
|
||||||
|
@ -33,7 +26,7 @@ class UserFormRequest extends AdminFormRequest
|
||||||
{
|
{
|
||||||
if ($this->method === 'PATCH') {
|
if ($this->method === 'PATCH') {
|
||||||
return array_merge(
|
return array_merge(
|
||||||
$this->intersect('password'),
|
$this->all(['password']),
|
||||||
$this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'ignore_connection_error'])
|
$this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'ignore_connection_error'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue