X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0e78061cdba5cfb3f299f57b7643d2b396ee235b..041059690882d6420fd8bd087bb28e5cb2ea9123:/app/controllers/sessions_controller.rb diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 7e6a740f3..bb3854e69 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -34,10 +34,14 @@ class SessionsController < ApplicationController token&.destroy session.delete(:token) end + session.delete(:user) session_expires_automatically - if params[:referer] - redirect_to safe_referer(params[:referer]) + + referer = safe_referer(params[:referer]) if params[:referer] + + if referer + redirect_to referer else redirect_to :controller => "site", :action => "index" end