Sha256: 161c336fa783660aab91dc58f346c46b27a17ccf64a1c50aedd6adaa8f120c45

Contents?: true

Size: 809 Bytes

Versions: 22

Compression:

Stored size: 809 Bytes

Contents

# frozen-string-literal: true

module Rodauth
  Feature.define(:change_password_notify, :ChangePasswordNotify) do
    depends :change_password, :email_base

    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
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rodauth-2.21.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.20.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.19.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.18.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.17.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.16.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.15.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.14.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.13.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.12.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.11.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.10.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.9.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.8.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.7.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.6.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.5.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.4.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.3.0 lib/rodauth/features/change_password_notify.rb
rodauth-2.2.0 lib/rodauth/features/change_password_notify.rb