tridiontridion-2011

How to get the user Id of the currently logged user in Tridion?


I implemented a Ribbon tool bar button in the Tridion. As part of that I need to loop through the some components, which requires a valid session.

To create a session in the Tridion I require a User Id. How to get the User Id of the current user(windows User Id)?

Will the following command help us to get the user info? If so please let me know the usage of the command.

getJsonUserSettings();

Thanks in advance. Early response is appreciated.


Solution

  • Try this way to get the User ID:

    Tridion.UI.UserSettings.getJsonUserSettings(true).User["@ID"]