X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..48ed305163ac44e420de60d7ffc5af1a1c3950c2:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3489b4eda..933cec53d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -83,7 +83,7 @@ class UsersController < ApplicationController end if current_user.save - flash[:piwik_goal] = PIWIK["goals"]["signup"] if defined?(PIWIK) + flash[:matomo_goal] = Settings.matomo["goals"]["signup"] if defined?(Settings.matomo) referer = welcome_path @@ -136,11 +136,7 @@ class UsersController < ApplicationController if current_user # The user is logged in already, so don't show them the signup # page, instead send them to the home page - if @referer - redirect_to @referer - else - redirect_to :controller => "site", :action => "index" - end + redirect_to @referer || { :controller => "site", :action => "index" } elsif params.key?(:auth_provider) && params.key?(:auth_uid) self.current_user = User.new(:email => params[:email], :email_confirmation => params[:email], @@ -275,7 +271,7 @@ class UsersController < ApplicationController session[:new_user].auth_provider = provider session[:new_user].auth_uid = uid - session[:new_user].status = "active" if email_verified && email == session[:new_user].email + session[:new_user].activate if email_verified && email == session[:new_user].email redirect_to :action => "terms" else