]> git.openstreetmap.org Git - rails.git/commitdiff
Log any session that is reset due to a username mismatch
authorTom Hughes <tom@compton.nu>
Thu, 24 Nov 2011 09:42:04 +0000 (09:42 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 24 Nov 2011 09:42:04 +0000 (09:42 +0000)
app/controllers/application_controller.rb

index 44307d482e90e7afaca8e01c15be347f8208b7b7..96bf915c0f9e3034fe9c0cb2029c1feb8ae1861b 100644 (file)
@@ -19,6 +19,7 @@ class ApplicationController < ActionController::Base
       @user = User.where(:id => session[:user]).where("status IN ('active', 'confirmed', 'suspended')").first
 
       if @user.display_name != cookies["_osm_username"]
+        logger.info "Session user '#{@user.display_name}' does not match cookie user '#{cookies['_osm_username']}'"
         reset_session
         @user = nil
       elsif @user.status == "suspended"