From a5e1bad3c4a18c0162bb618cc85255d1b526f971 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Wed, 7 May 2025 16:27:51 +0100 Subject: [PATCH] Remove useless exception --- .../Email/Notifications/VerifyEmailAuthentication.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/panels/src/Auth/MultiFactor/Email/Notifications/VerifyEmailAuthentication.php b/packages/panels/src/Auth/MultiFactor/Email/Notifications/VerifyEmailAuthentication.php index 2adbbfded6..3bd873ef97 100644 --- a/packages/panels/src/Auth/MultiFactor/Email/Notifications/VerifyEmailAuthentication.php +++ b/packages/panels/src/Auth/MultiFactor/Email/Notifications/VerifyEmailAuthentication.php @@ -2,8 +2,6 @@ namespace Filament\Auth\MultiFactor\Email\Notifications; -use Exception; -use Filament\Auth\MultiFactor\Email\Contracts\HasEmailAuthentication; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; @@ -28,10 +26,6 @@ class VerifyEmailAuthentication extends Notification implements ShouldQueue public function toMail(object $notifiable): MailMessage { - if (! ($notifiable instanceof HasEmailAuthentication)) { - throw new Exception('The user model must implement the [' . HasEmailAuthentication::class . '] interface to use email authentication.'); - } - return (new MailMessage) ->subject(__('filament-panels::auth/multi-factor/email/notifications/verify-email-authentication.subject')) ->line(trans_choice('filament-panels::auth/multi-factor/email/notifications/verify-email-authentication.lines.0', $this->codeExpiryMinutes, ['code' => $this->code, 'minutes' => $this->codeExpiryMinutes]))