Fixed activity log in switch back.

This commit is contained in:
Martin Edenhofer 2014-09-21 15:19:28 +02:00
parent 23dfce1191
commit 5b3cae547c

View file

@ -240,8 +240,8 @@ class SessionsController < ApplicationController
return false return false
end end
# log end session # rememeber current user
current_user.activity_stream_log( 'ended switch to', user.id, true ) current_session_user = current_user
# remove switched_from_user_id # remove switched_from_user_id
session[:switched_from_user_id] = nil session[:switched_from_user_id] = nil
@ -249,6 +249,9 @@ class SessionsController < ApplicationController
# set old session user again # set old session user again
current_user_set(user) current_user_set(user)
# log end session
current_session_user.activity_stream_log( 'ended switch to', user.id, true )
redirect_to '/#' redirect_to '/#'
end end