diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-08-10 13:13:09 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-08-11 16:02:10 -0700 |
commit | 8f6205d1442cb6d88e992bff7a07c088ae92d93a (patch) | |
tree | 1a9771faf4569f2f350f66ae283cbddc7045e61d | |
parent | cc4f77c632130097f6c9667a421d10ce1f47c6c5 (diff) | |
download | gitlab-ce-8f6205d1442cb6d88e992bff7a07c088ae92d93a.tar.gz |
don't send devise notifications to the ghost user
-rw-r--r-- | app/models/user.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 7935b89662b..a4615436245 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 |