]> _ Git - psq.git/commitdiff
event
authorLouis Jeckel <louis.jeckel@outlook.com>
Mon, 19 Oct 2020 17:19:40 +0000 (19:19 +0200)
committerLouis Jeckel <louis.jeckel@outlook.com>
Mon, 19 Oct 2020 17:19:40 +0000 (19:19 +0200)
app/Listeners/PasswordResetListener.php [new file with mode: 0644]

diff --git a/app/Listeners/PasswordResetListener.php b/app/Listeners/PasswordResetListener.php
new file mode 100644 (file)
index 0000000..6e7274c
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace App\Listeners;
+
+use Illuminate\Auth\Events\PasswordReset;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Queue\InteractsWithQueue;
+
+class PasswordResetListener
+{
+    /**
+     * Create the event listener.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        //
+    }
+
+    /**
+     * Handle the event.
+     *
+     * @param  PasswordReset  $event
+     * @return void
+     */
+    public function handle(PasswordReset $event)
+    {
+        $event->user->update(['reg_complete' => true]);
+    }
+}