Added more debug info for login issues.

This commit is contained in:
Martin Edenhofer 2013-06-23 17:43:26 +02:00
parent d08ee5dd5b
commit c3c6f510b2

View file

@ -21,16 +21,17 @@ class SessionsController < ApplicationController
default_collection = SessionHelper::default_collections(user) default_collection = SessionHelper::default_collections(user)
# remember me - set session cookie to expire later # remember me - set session cookie to expire later
reset_session puts "RACK " + request.env['rack.session.options'].inspect
if params[:remember_me] if params[:remember_me]
request.env['rack.session.options'][:expire_after] = 1.year request.env['rack.session.options'][:expire_after] = 1.year
else else
request.env['rack.session.options'][:expire_after] = nil request.env['rack.session.options'][:expire_after] = nil
end end
reset_session
puts "RACK2 " + request.env['rack.session.options'].inspect
# set session user_id # set session user_id
user = User.find_fulldata(user.id) user = User.find_fulldata(user.id)
session[:user_id] = user['id']
puts "..." puts "..."
puts session.inspect puts session.inspect
# check logon session # check logon session
@ -43,10 +44,13 @@ class SessionsController < ApplicationController
# :user_id => user['id'] # :user_id => user['id']
# } # }
# ) # )
else
session[:user_id] = user['id']
end end
puts ".222.." puts ".222.."
puts session.inspect puts session.inspect
puts cookies.inspect
# return new session data # return new session data
render :json => { render :json => {