don't send devise notifications to the ghost user
This commit is contained in:
parent
cc4f77c632
commit
8f6205d144
1 changed files with 1 additions and 0 deletions
|
@ -1069,6 +1069,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
# Added according to https://github.com/plataformatec/devise/blob/7df57d5081f9884849ca15e4fde179ef164a575f/README.md#activejob-integration
|
||||
def send_devise_notification(notification, *args)
|
||||
return true unless can?(:receive_notifications)
|
||||
devise_mailer.send(notification, self, *args).deliver_later
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue