FSI API: User Details
Logged in user details
fsi.getLoggedUserId(); Returns the logged in user id.
fsi.getLoggedUserName(); Returns the logged in user name.
This example displays the logged in user id in a text box.
function showUserId() {
var userid = fsi.getLoggedUserId();
fsi.setById('text-v7GZ', 'Hello ' + userid + ',');
}
fsi.GetProfilePic(<user id>, <isSmallPic>); Returns the URL of the specified user's profile picture. If isSmallPic is true, the URL of the small picture is returned.
Example:
Small profile picture: <portal>/richard/Web/ProfilePic/25514_small?ts=1534329729
fsi.GetProfilePicBaseUrl(); Returns the base URL of the user's profile picture; for example, /<user>/Web/ProfilePic/.
Current user details
fsi.getCurrentUserDetails(); Returns the currently logged in user's UserId, FirstName, LastName and SocialName.
Get user details by Id
fsi.getUserDetails(<user id>); Returns the specified user's UserId, FirstName, LastName and SocialName.