Skip to content

Commit 631b5eb

Browse files
committed
Fix form requests
1 parent c6cece5 commit 631b5eb

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

app/Http/Requests/Admin/AdminFormRequest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ public function authorize()
4444
*/
4545
public function normalize($only = [])
4646
{
47-
return array_merge(
48-
$this->only($only),
49-
$this->intersect(array_keys($this->rules()))
50-
);
47+
return $this->all(empty($only) ? array_keys($this->rules()) : $only);
5148
}
5249
}

app/Http/Requests/Admin/UserFormRequest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
<?php
2-
/**
3-
* Pterodactyl - Panel
4-
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5-
*
6-
* This software is licensed under the terms of the MIT license.
7-
* https://opensource.org/licenses/MIT
8-
*/
92

103
namespace Pterodactyl\Http\Requests\Admin;
114

@@ -33,7 +26,7 @@ public function normalize($only = [])
3326
{
3427
if ($this->method === 'PATCH') {
3528
return array_merge(
36-
$this->intersect('password'),
29+
$this->all(['password']),
3730
$this->only(['email', 'username', 'name_first', 'name_last', 'root_admin', 'ignore_connection_error'])
3831
);
3932
}

0 commit comments

Comments
 (0)