Use rails tokens for signup confirmations

This commit is contained in:
Tom Hughes 2023-12-07 18:49:49 +00:00
parent ad2739347b
commit 4dff06a629
11 changed files with 87 additions and 94 deletions

View file

@ -10,11 +10,12 @@ class UserMailer < ApplicationMailer
before_action :set_shared_template_vars
before_action :attach_project_logo
def signup_confirm(user, token)
def signup_confirm(user, token, referer = nil)
with_recipient_locale user do
@url = url_for(:controller => "confirmations", :action => "confirm",
:display_name => user.display_name,
:confirm_string => token.token)
:confirm_string => token,
:referer => referer)
mail :to => user.email,
:subject => t(".subject")