1

Resolved

Bug showing images

description

Bug showing images (will be fixed in new release):
 
Modified function:
 
private string GetUserPictureUrl(string accountName)
    {
        string imageUrl = "";
        try
        {
            ServerContext siteContext = ServerContext.GetContext(SPContext.Current.Site);
            UserProfileManager pmManager = new UserProfileManager(siteContext);
 
 
            UserProfile profile = pmManager.GetUserProfile(accountName);
            //get user image URL    
            imageUrl = profile[PropertyConstants.PictureUrl].Value.ToString();

        }
.........
}
// get user picture
if (!String.IsNullOrEmpty(GetUserPictureUrl(user.LoginName)))
{
img.ImageUrl = GetUserPictureUrl(user.LoginName);
}

comments