X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f9d714dfd36fa56ced4c0a99a6e59c945ff89cca..0effb12e4e9d6fd16f3dbb5315437dc1b2e78431:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 57d2f7d13..df0c8d841 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -90,15 +90,14 @@ class UserController < ApplicationController if @user.status == "active" flash[:notice] = t 'user.new.flash welcome', :email => @user.email - - Notifier.signup_confirm(@user, nil).deliver + session[:referer] = welcome_path successful_login(@user) else flash[:notice] = t 'user.new.flash create success message', :email => @user.email session[:token] = @user.tokens.create.token - Notifier.signup_confirm(@user, @user.tokens.create(:referer => session.delete(:referer))).deliver + Notifier.signup_confirm(@user, @user.tokens.create(:referer => welcome_path)).deliver redirect_to :action => 'login', :referer => params[:referer] end