File: otp_modify_email.rb

package info (click to toggle)
ruby-rodauth 2.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 812 kB
  • sloc: ruby: 7,524; javascript: 100; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 513 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen-string-literal: true

module Rodauth
  Feature.define(:otp_modify_email, :OtpModifyEmail) do
    depends :otp, :email_base

    loaded_templates %w'otp-setup-email otp-disabled-email'
    email :otp_setup, 'TOTP Authentication Setup', :translatable=>true
    email :otp_disabled, 'TOTP Authentication Disabled', :translatable=>true

    private

    def after_otp_setup
      super
      send_otp_setup_email
    end

    def after_otp_disable
      super
      send_otp_disabled_email
    end
  end
end