@@ -73,12 +73,7 class AccountController < ApplicationController | |||
|
73 | 73 | @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] |
|
74 | 74 | if @user.save |
|
75 | 75 | @token.destroy |
|
76 |
Mailer. |
|
|
77 | message: :mail_body_security_notification_change, | |
|
78 | field: :field_password, | |
|
79 | title: :button_change_password, | |
|
80 | url: {controller: 'my', action: 'password'} | |
|
81 | ).deliver | |
|
76 | Mailer.password_updated(@user) | |
|
82 | 77 | flash[:notice] = l(:notice_account_password_updated) |
|
83 | 78 | redirect_to signin_path |
|
84 | 79 | return |
@@ -105,12 +105,7 class MyController < ApplicationController | |||
|
105 | 105 | if @user.save |
|
106 | 106 | # The session token was destroyed by the password change, generate a new one |
|
107 | 107 | session[:tk] = @user.generate_session_token |
|
108 |
Mailer. |
|
|
109 | message: :mail_body_security_notification_change, | |
|
110 | field: :field_password, | |
|
111 | title: :button_change_password, | |
|
112 | url: {controller: 'my', action: 'password'} | |
|
113 | ).deliver | |
|
108 | Mailer.password_updated(@user) | |
|
114 | 109 | flash[:notice] = l(:notice_account_password_updated) |
|
115 | 110 | redirect_to my_account_path |
|
116 | 111 | end |
@@ -310,6 +310,16 class Mailer < ActionMailer::Base | |||
|
310 | 310 | :subject => l(:mail_subject_lost_password, Setting.app_title) |
|
311 | 311 | end |
|
312 | 312 | |
|
313 | # Notifies user that his password was updated | |
|
314 | def self.password_updated(user) | |
|
315 | Mailer.security_notification(user, | |
|
316 | message: :mail_body_security_notification_change, | |
|
317 | field: :field_password, | |
|
318 | title: :button_change_password, | |
|
319 | url: {controller: 'my', action: 'password'} | |
|
320 | ).deliver | |
|
321 | end | |
|
322 | ||
|
313 | 323 | def register(token) |
|
314 | 324 | set_language_if_valid(token.user.language) |
|
315 | 325 | @token = token |
General Comments 0
You need to be logged in to leave comments.
Login now