Fix for user creation
This commit is contained in:
parent
6994758732
commit
e7821d4c80
@ -21,7 +21,7 @@ class UserRequest extends FormRequest
|
||||
|
||||
$o = $this->route('o');
|
||||
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',
|
||||
'pgp_pubkey' => [
|
||||
'nullable',
|
||||
@ -33,7 +33,7 @@ class UserRequest extends FormRequest
|
||||
'admin' => 'required|boolean',
|
||||
'system_id' => [
|
||||
'nullable',
|
||||
Rule::in($o->systems->pluck('id')),
|
||||
Rule::in($o?->systems->pluck('id')),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user