diff --git a/app/Models/User.php b/app/Models/User.php index 45ef0db0..22ef1839 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -322,6 +322,12 @@ public function setFullPermission(int $organizationID): void public function sendWelcomeNotificationInAnotherTenant(): void { - $this->notify(new WelcomeNotificationInAnotherTenant); + if ($this->password_set_at) { + $this->notify(new WelcomeNotificationInAnotherTenant); + + return; + } + + $this->sendWelcomeNotification(); } } diff --git a/app/Notifications/Organizations/WelcomeNotificationInAnotherTenant.php b/app/Notifications/Organizations/WelcomeNotificationInAnotherTenant.php index d06c238c..c9564b12 100644 --- a/app/Notifications/Organizations/WelcomeNotificationInAnotherTenant.php +++ b/app/Notifications/Organizations/WelcomeNotificationInAnotherTenant.php @@ -10,7 +10,6 @@ use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\URL; use Illuminate\Support\HtmlString; -use Vite; class WelcomeNotificationInAnotherTenant extends Notification { @@ -33,10 +32,8 @@ public function via(object $notifiable): array */ public function toMail(object $notifiable): MailMessage { - // TODO: change line msg return (new MailMessage) ->subject(__('email.organization.welcome_in_anther_tenant.subject')) -// ->line('![Logo](' . Vite::asset('resources/svg/logo.svg') . ')') ->greeting(__('email.organization.welcome_in_anther_tenant.greeting', ['name' => $notifiable->first_name])) ->line( __('email.organization.welcome_in_anther_tenant.intro_line_1', [