Add ability to disable login and mark accounts as memorial (#5615)
Fix #5597
This commit is contained in:
parent
cbbeec05be
commit
1032f3994f
17 changed files with 168 additions and 39 deletions
|
@ -10,6 +10,8 @@ class UserMailer < Devise::Mailer
|
|||
@token = token
|
||||
@instance = Rails.configuration.x.local_domain
|
||||
|
||||
return if @resource.disabled?
|
||||
|
||||
I18n.with_locale(@resource.locale || I18n.default_locale) do
|
||||
mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email, subject: I18n.t('devise.mailer.confirmation_instructions.subject', instance: @instance)
|
||||
end
|
||||
|
@ -20,6 +22,8 @@ class UserMailer < Devise::Mailer
|
|||
@token = token
|
||||
@instance = Rails.configuration.x.local_domain
|
||||
|
||||
return if @resource.disabled?
|
||||
|
||||
I18n.with_locale(@resource.locale || I18n.default_locale) do
|
||||
mail to: @resource.email, subject: I18n.t('devise.mailer.reset_password_instructions.subject')
|
||||
end
|
||||
|
@ -29,6 +33,8 @@ class UserMailer < Devise::Mailer
|
|||
@resource = user
|
||||
@instance = Rails.configuration.x.local_domain
|
||||
|
||||
return if @resource.disabled?
|
||||
|
||||
I18n.with_locale(@resource.locale || I18n.default_locale) do
|
||||
mail to: @resource.email, subject: I18n.t('devise.mailer.password_change.subject')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue