mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Add merge event
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
dab4aced48
commit
50df750202
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\Events\UserMerged;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
@ -121,6 +122,10 @@ class MergeUsersByUsername extends Command
|
||||||
$this->info('Marking the user as deleted');
|
$this->info('Marking the user as deleted');
|
||||||
$bad_user->deleted_at = Carbon::now()->timestamp;
|
$bad_user->deleted_at = Carbon::now()->timestamp;
|
||||||
$bad_user->save();
|
$bad_user->save();
|
||||||
|
|
||||||
|
event(new UserMerged($bad_user, $user, null));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue