Contact create use role issue solved.. ( #33k7zvx )
This commit is contained in:
parent
32f38663d1
commit
149303a000
@ -43,17 +43,17 @@ class CreateContact extends Job implements HasOwner, HasSource, ShouldCreate
|
||||
throw new \Exception($message);
|
||||
}
|
||||
|
||||
$customer_role = Role::all()->filter(function ($role) {
|
||||
$customer_role_id = Role::all()->filter(function ($role) {
|
||||
return $role->hasPermission('read-client-portal');
|
||||
})->pluck('id')->toArray();
|
||||
})->pluck('id')->first();
|
||||
|
||||
$this->request->merge([
|
||||
'locale' => setting('default.locale', 'en-GB'),
|
||||
'roles' => $customer_role,
|
||||
'roles' => $customer_role_id,
|
||||
'companies' => [$this->request->get('company_id')],
|
||||
]);
|
||||
|
||||
$user = $this->dispatch(new CreateUser($this->request));
|
||||
$user = $this->dispatch(new ($this->request));
|
||||
|
||||
$this->request['user_id'] = $user->id;
|
||||
}
|
||||
|
@ -57,13 +57,13 @@ class UpdateContact extends Job implements ShouldUpdate
|
||||
throw new \Exception($message);
|
||||
}
|
||||
|
||||
$customer_role = Role::all()->filter(function ($role) {
|
||||
$customer_role_id = Role::all()->filter(function ($role) {
|
||||
return $role->hasPermission('read-client-portal');
|
||||
})->pluck('id')->toArray();
|
||||
})->pluck('id')->first();
|
||||
|
||||
$this->request->merge([
|
||||
'locale' => setting('default.locale', 'en-GB'),
|
||||
'roles' => $customer_role,
|
||||
'roles' => $customer_role_id,
|
||||
'companies' => [$this->request->get('company_id')],
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user