Skip to content

A self-hosted media server and file management system

feat: queue password reset on user

aminnausinf269f63fdd90
diff --git a/app/Models/User.php b/app/Models/User.php
index 9b5009f2..e8c8dc9a 100755
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -2,6 +2,7 @@
namespace App\Models;
+use App\Notifications\QueuedResetPassword;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
@@ -51,4 +52,14 @@ class User extends Authenticatable {
return false;
}
+
+ /**
+ * Send the password reset notification.
+ *
+ * @param string $token
+ * @return void
+ */
+ public function sendPasswordResetNotification($token) {
+ $this->notify(new QueuedResetPassword($token));
+ }
}