Verified event ISO a GGW (remove custom event)

This commit is contained in:
Jérémy Munsch 2023-12-15 17:42:25 +01:00
parent 7635608728
commit b2a4b5de14
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 0 additions and 29 deletions

View file

@ -1,24 +0,0 @@
<?php
namespace App\Listeners;
use Illuminate\Auth\Events\Verified;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class LogVerifiedUser
{
/**
* Handle the given event.
*
* @param \Illuminate\Auth\Events\Verified $event
* @return void
*/
public function handle(Verified $event)
{
/** @var \App\Models\Customer */
$customer = $event->user;
Auth::guard('frontend')->login($customer);
Session::flash('success', trans('Votre compte à bien été validé, vous êtes à présent connecté.'));
}
}

View file

@ -2,11 +2,9 @@
namespace App\Providers;
use App\Listeners\LogVerifiedUser;
use App\Listeners\PasswordHasReset;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Events\Verified;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
@ -21,9 +19,6 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],
Verified::class => [
LogVerifiedUser::class
],
PasswordReset::class => [
PasswordHasReset::class
],