Skip to content

Commit

Permalink
Don't enable change_password_notify feature by default
Browse files Browse the repository at this point in the history
It's not an essential feature, and for consistency we should then also
enable reset_password_notify feature, but I would prefer to be more
minimalistic.
  • Loading branch information
janko committed Jul 24, 2024
1 parent 39c84cf commit 1d5c464
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class RodauthMailer < ApplicationMailer
mail to: @new_email, subject: @rodauth.email_subject_prefix + @rodauth.verify_login_change_email_subject
end

def password_changed(name, account_id)
@rodauth = rodauth(name, account_id)
@account = @rodauth.rails_account
# def password_changed(name, account_id)
# @rodauth = rodauth(name, account_id)
# @account = @rodauth.rails_account

mail subject: @rodauth.email_subject_prefix + @rodauth.password_changed_email_subject
end
# mail subject: @rodauth.email_subject_prefix + @rodauth.password_changed_email_subject
# end

# def reset_password_notify(name, account_id)
# @rodauth = rodauth(name, account_id)
Expand Down
10 changes: 5 additions & 5 deletions lib/generators/rodauth/templates/app/misc/rodauth_main.rb.tt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class RodauthMain < Rodauth::Rails::Auth
# List of authentication features that are loaded.
enable :create_account, :verify_account, :verify_account_grace_period,
:login, :logout<%= ", :remember" unless jwt? %><%= ", :json" if json? %><%= ", :jwt" if jwt? %>,
:reset_password, :change_password, :change_password_notify,
:change_login, :verify_login_change, :close_account<%= ", :argon2" if argon2? %>
:reset_password, :change_password, :change_login, :verify_login_change,
:close_account<%= ", :argon2" if argon2? %>

# See the Rodauth documentation for the list of available config options:
# http://rodauth.jeremyevans.net/documentation.html
Expand Down Expand Up @@ -118,9 +118,9 @@ class RodauthMain < Rodauth::Rails::Auth
create_verify_login_change_email do |_login|
RodauthMailer.verify_login_change(self.class.configuration_name, account_id, verify_login_change_key_value)
end
create_password_changed_email do
RodauthMailer.password_changed(self.class.configuration_name, account_id)
end
# create_password_changed_email do
# RodauthMailer.password_changed(self.class.configuration_name, account_id)
# end
# create_reset_password_notify_email do
# RodauthMailer.reset_password_notify(self.class.configuration_name, account_id)
# end
Expand Down

0 comments on commit 1d5c464

Please sign in to comment.