X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7406ae5dcc9cbb177a8ea33085af9caf6e3ebb1b..4dff06a6293971c3e17f8508859a1d80717a23f6:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ab13f93be..429fa47a4 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -203,8 +203,8 @@ class UsersController < ApplicationController session[:referer] = referer successful_login(current_user) else - session[:token] = current_user.tokens.create.token - UserMailer.signup_confirm(current_user, current_user.tokens.create(:referer => referer)).deliver_later + session[:pending_user] = current_user.id + UserMailer.signup_confirm(current_user, current_user.generate_token_for(:new_user), referer).deliver_later redirect_to :controller => :confirmations, :action => :confirm, :display_name => current_user.display_name end else