X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e3c919275818d46a515c183cf373d7a53bc6942a..17323257685bf5134d9286f5baefaddcae65478c:/app/controllers/concerns/session_methods.rb diff --git a/app/controllers/concerns/session_methods.rb b/app/controllers/concerns/session_methods.rb index 45cf0d943..4bbfac34f 100644 --- a/app/controllers/concerns/session_methods.rb +++ b/app/controllers/concerns/session_methods.rb @@ -39,6 +39,8 @@ module SessionMethods session[:fingerprint] = user.fingerprint session_expires_after 28.days if session[:remember_me] + cookies.delete :_osm_anonymous_notes_count + target = referer || url_for(:controller => :site, :action => :index) # The user is logged in, so decide where to send them: @@ -48,7 +50,7 @@ module SessionMethods # - If they were referred to the login, send them back there. # - Otherwise, send them to the home page. if !user.terms_seen - redirect_to :controller => :users, :action => :terms, :referer => target + redirect_to account_terms_path(:referer => target) elsif user.blocked_on_view redirect_to user.blocked_on_view, :referer => target else