var currentUser = UserController.Instance.GetCurrentUserInfo();
var userId = 5; var userInfo = UserController.Instance.GetUserById(PortalId, userId);This code retrieves the UserInfo object for the user with ID 5 in the current portal. These examples are part of the DotNetNuke framework and use the DotNetNuke.Entities.Users namespace.