Fix for user creation
This commit is contained in:
parent
1753111f8f
commit
efdb6b96ea
@ -21,7 +21,7 @@ class UserRequest extends FormRequest
|
|||||||
|
|
||||||
$o = $this->route('o');
|
$o = $this->route('o');
|
||||||
return [
|
return [
|
||||||
'email' => 'required|email|unique:users,email,'.($o->exists ? $o->id : 0),
|
'email' => 'required|email|unique:users,email,'.($o?->exists ? $o->id : 0),
|
||||||
'name' => 'required|min:3',
|
'name' => 'required|min:3',
|
||||||
'pgp_pubkey' => [
|
'pgp_pubkey' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
@ -33,7 +33,7 @@ class UserRequest extends FormRequest
|
|||||||
'admin' => 'required|boolean',
|
'admin' => 'required|boolean',
|
||||||
'system_id' => [
|
'system_id' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
Rule::in($o->systems->pluck('id')),
|
Rule::in($o?->systems->pluck('id')),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user