11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/controllers/searls/auth/requests_password_resets_controller.rb', line 11
def create
email = params[:email].to_s.strip
user = Searls::Auth.config.user_finder_by_email.call(email)
if proceed_with_password_reset_request?(user)
Searls::Auth::DeliversPasswordReset.new.deliver(
user:,
redirect_path: params[:redirect_path],
redirect_subdomain: params[:redirect_subdomain]
)
end
flash[:notice] = Searls::Auth.config.resolve(:flash_notice_after_password_reset_email, params)
redirect_to searls_auth.password_reset_request_path(
email: email,
redirect_path: params[:redirect_path],
redirect_subdomain: params[:redirect_subdomain]
)
end
|