Developer forum

Forum » Development » Reload Login
Ricardo Pereira
Reply

Hi Guys,

How can I reload the user logged?
I add a new impersontation user to the actual user logged, but I can not access to that impersonation user in the same session.

 

Thank you,

Ricardo


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Something like this should do it:

Modules.UserManagement.User.set_Current(Modules.UserManagement.PagePermissionLevels.Frontend, Modules.UserManagement.User.GetUserByID(Modules.UserManagement.User.GetCurrentUser().ID));

Or more simple:

Modules.UserManagement.User.set_Current(Modules.UserManagement.PagePermissionLevels.Frontend, null);

Votes for this answer: 1

 

You must be logged in to post in the forum