X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbf35e0cf67ee330cd02c2431e0ed6d08681d184..2731e7244ac554c4a17f69347851f8f829cd1caa:/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