Fixed activity log in switch back.
This commit is contained in:
parent
23dfce1191
commit
5b3cae547c
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue