From 71b428e34830385713d41543072ba244f497392f Mon Sep 17 00:00:00 2001 From: Developer <> Date: Tue, 23 Feb 2021 13:31:00 -0500 Subject: [PATCH] Added checks in emails regarding GabPRO if email is confirmed and allows GabPRO emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added: - checks in emails regarding GabPRO if email is confirmed and allows GabPRO emails --- app/mailers/user_mailer.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 94c007b5..20cdaee9 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -10,7 +10,7 @@ class UserMailer < Devise::Mailer def pro_expired(user) @resource = user - return if @resource.disabled? + return if @resource.disabled? || !@resource.allows_pro_reminder_emails? || !@resource.confirmed? I18n.with_locale(@resource.locale || I18n.default_locale) do mail to: @resource.email, subject: I18n.t('user_mailer.pro_expired.subject') @@ -24,7 +24,7 @@ class UserMailer < Devise::Mailer return unless valid_date_ranges.include?(@date_range) @resource = user - return if @resource.disabled? + return if @resource.disabled? || !@resource.allows_pro_reminder_emails? || !@resource.confirmed? subject = "Renew GabPRO Today" case @date_range @@ -54,7 +54,7 @@ class UserMailer < Devise::Mailer return unless valid_date_ranges.include?(@date_range) @resource = user - return if @resource.disabled? + return if @resource.disabled? || !@resource.allows_pro_reminder_emails? || !@resource.confirmed? subject = 'Gab Is Powered By You' case @date_range