summaryrefslogtreecommitdiffstats
path: root/app/controllers/account_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-10-10 17:13:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-10-10 17:13:09 +0000
commit0c78056a69cc3bee7fb1cd3261046995db55bfdf (patch)
tree67883c68edad43b2e6f96e9ea8b864370a6b207c /app/controllers/account_controller.rb
parent5533eeff239e024539f3ddd5b2ffe3528144beef (diff)
downloadredmine-0c78056a69cc3bee7fb1cd3261046995db55bfdf.tar.gz
redmine-0c78056a69cc3bee7fb1cd3261046995db55bfdf.zip
Send emails asynchronously (#26791).
Custom async_* delivery methods are removed in favor of ActiveJob (Async by default). git-svn-id: http://svn.redmine.org/redmine/trunk@17588 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/account_controller.rb')
-rw-r--r--app/controllers/account_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 5070295d2..7bb644761 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -87,7 +87,7 @@ class AccountController < ApplicationController
@user.must_change_passwd = false
if @user.save
@token.destroy
- Mailer.password_updated(@user, { remote_ip: request.remote_ip })
+ Mailer.deliver_password_updated(@user, User.current)
flash[:notice] = l(:notice_account_password_updated)
redirect_to signin_path
return
@@ -119,7 +119,7 @@ class AccountController < ApplicationController
if token.save
# Don't use the param to send the email
recipent = user.mails.detect {|e| email.casecmp(e) == 0} || user.mail
- Mailer.lost_password(token, recipent).deliver
+ Mailer.deliver_lost_password(user, token, recipent)
flash[:notice] = l(:notice_account_lost_email_sent)
redirect_to signin_path
return
@@ -313,7 +313,7 @@ class AccountController < ApplicationController
def register_by_email_activation(user, &block)
token = Token.new(:user => user, :action => "register")
if user.save and token.save
- Mailer.register(token).deliver
+ Mailer.deliver_register(user, token)
flash[:notice] = l(:notice_account_register_done, :email => ERB::Util.h(user.mail))
redirect_to signin_path
else
@@ -343,7 +343,7 @@ class AccountController < ApplicationController
def register_manually_by_administrator(user, &block)
if user.save
# Sends an email to the administrators
- Mailer.account_activation_request(user).deliver
+ Mailer.deliver_account_activation_request(user)
account_pending(user)
else
yield if block_given?