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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue