Welcome screen works with confirmation email too
This commit is contained in:
parent
60c885d071
commit
87a5a0844b
1 changed files with 6 additions and 6 deletions
|
@ -197,23 +197,23 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
flash[:matomo_goal] = Settings.matomo["goals"]["signup"] if defined?(Settings.matomo)
|
flash[:matomo_goal] = Settings.matomo["goals"]["signup"] if defined?(Settings.matomo)
|
||||||
|
|
||||||
referer = welcome_path
|
|
||||||
|
|
||||||
uri = URI(session[:referer]) if session[:referer].present?
|
uri = URI(session[:referer]) if session[:referer].present?
|
||||||
|
welcome_options = {}
|
||||||
|
welcome_options["oauth_return_url"] = uri&.to_s if uri&.path == oauth_authorization_path
|
||||||
|
|
||||||
begin
|
begin
|
||||||
%r{map=(.*)/(.*)/(.*)}.match(uri.fragment) do |m|
|
%r{map=(.*)/(.*)/(.*)}.match(uri.fragment) do |m|
|
||||||
editor = Rack::Utils.parse_query(uri.query).slice("editor")
|
editor = Rack::Utils.parse_query(uri.query).slice("editor")
|
||||||
referer = welcome_path({ "zoom" => m[1],
|
welcome_options = { "zoom" => m[1],
|
||||||
"lat" => m[2],
|
"lat" => m[2],
|
||||||
"lon" => m[3] }.merge(editor))
|
"lon" => m[3] }.merge(editor).merge(welcome_options)
|
||||||
end
|
end
|
||||||
rescue StandardError
|
rescue StandardError
|
||||||
# Use default
|
# Use default
|
||||||
end
|
end
|
||||||
|
referer = welcome_path(welcome_options)
|
||||||
|
|
||||||
if current_user.status == "active"
|
if current_user.status == "active"
|
||||||
referer = welcome_path({"oauth_return_url" => uri.to_s}) if uri&.path == oauth_authorization_path
|
|
||||||
session[:referer] = referer
|
session[:referer] = referer
|
||||||
successful_login(current_user)
|
successful_login(current_user)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue