user updating flow updated

This commit is contained in:
Sevan Nerse 2022-06-29 10:38:23 +03:00
parent 7a7803cb68
commit 127d85d0d9

View File

@ -67,20 +67,6 @@ class UpdateUser extends Job implements ShouldUpdate
'user' => $this->model->id,
'company' => $company->id,
]);
$this->dispatch(new CreateInvitation($this->model, $company));
}
}
if (isset($sync) && !empty($sync['detached'])) {
foreach ($sync['detached'] as $id) {
$company = Company::find($id);
if ($this->model->hasPendingInvitation($company->id)) {
$pending_invitation = $this->model->getPendingInvitation($company->id);
$this->dispatch(new DeleteInvitation($pending_invitation));
}
}
}
});