This commit is contained in:
Dane Everitt 2017-12-30 20:25:04 -06:00
parent 10e2e6e379
commit 5efee34378
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 111 additions and 135 deletions

View file

@ -22,12 +22,16 @@ class UserFormRequest extends AdminFormRequest
return User::getCreateRules();
}
public function normalize($only = [])
/**
* @param array|null $only
* @return array
*/
public function normalize(array $only = null)
{
if ($this->method === 'PATCH') {
return array_merge(
$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', 'language', 'ignore_connection_error'])
);
}