Sha256: 588212ef6c77639cade6be455d1950e3974f15d3158d2fd0d2e10919d0d6ef4d

Contents?: true

Size: 804 Bytes

Versions: 10

Compression:

Stored size: 804 Bytes

Contents

# frozen-string-literal: true

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

    auth_value_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
      create_password_changed_email.deliver!
    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

10 entries across 10 versions & 1 rubygems

Version Path
rodauth-1.22.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.21.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.20.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.19.1 lib/rodauth/features/change_password_notify.rb
rodauth-1.19.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.18.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.17.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.16.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.15.0 lib/rodauth/features/change_password_notify.rb
rodauth-1.14.0 lib/rodauth/features/change_password_notify.rb