Log any session that is reset due to a username mismatch
[rails.git] / 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"