IE 9 Bug? -- User information null in MediaContentDownloadedEvent
Hi there,
I have what seems to be a browser bug. I'm subscribing to the IMediaContentDownloadedEvent in order to track users opening documents. Everything works fine in Google Chrome, FF, Safari. However, when using IE 9 -- the code fires, however the User information is always null. How is it that this is happening? The 'user' variable below is null -- and the 'eventInfo.UserId' is an empty Guid. I'd appreciate any help with this...
//class that handles the event
public static void MediaContentDownloadedEvent(IMediaContentDownloadedEvent eventInfo)
var userId = eventInfo.UserId; //Guid
User user = GetCurrentSitefinityUser();
...
...
// utilities class to get the current user
public static User GetCurrentSitefinityUser()
var identity = ClaimsManager.GetCurrentIdentity();
var currentUserGuid = identity.UserId;
if (currentUserGuid != Guid.Empty)
UserProfileManager profileManager = UserProfileManager.GetManager();
UserManager userManager = UserManager.GetManager("Default");
return userManager.GetUser(currentUserGuid);
else
return null;
..
private void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
if (e.CommandName == "Bootstrapped")
EventHub.Subscribe<IMediaContentDownloadedEvent>(evt => CRD.Sitefinity.CustomDecorator.BusinessOpportunitiesDecorator.MediaContentDownloadedEvent(evt));