lib/rodauth/features/change_password_notify.rb in rodauth-2.21.0 vs lib/rodauth/features/change_password_notify.rb in rodauth-2.22.0
- old
+ new
@@ -1,33 +1,13 @@
# frozen-string-literal: true
module Rodauth
Feature.define(:change_password_notify, :ChangePasswordNotify) do
depends :change_password, :email_base
+ loaded_templates %w'password-changed-email'
+ email :password_changed, 'Password Changed', :translatable=>true
- translatable_method :password_changed_email_subject, 'Password Changed'
-
- auth_value_methods(
- :password_changed_email_body
- )
- auth_methods(
- :create_password_changed_email,
- :send_password_changed_email
- )
-
private
-
- def send_password_changed_email
- send_email(create_password_changed_email)
- end
-
- def create_password_changed_email
- create_email(password_changed_email_subject, password_changed_email_body)
- end
-
- def password_changed_email_body
- render('password-changed-email')
- end
def after_change_password
super
send_password_changed_email
end