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