Merge pull request #1469 from denisdulici/master
Not deleting user related to customer
This commit is contained in:
commit
c1fd4a35e2
@ -3,6 +3,7 @@
|
||||
namespace App\Jobs\Common;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Jobs\Auth\DeleteUser;
|
||||
use App\Traits\Contacts;
|
||||
|
||||
class DeleteContact extends Job
|
||||
@ -30,6 +31,10 @@ class DeleteContact extends Job
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
if ($user = $this->contact->user) {
|
||||
$this->dispatch(new DeleteUser($user));
|
||||
}
|
||||
|
||||
$this->contact->delete();
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user