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