X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8ecb53b8692cbaac262fba5b1baa632d7cef5353..2731e7244ac554c4a17f69347851f8f829cd1caa:/app/controllers/sessions_controller.rb?ds=sidebyside 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