private static void SetIdentity(AuthorizationContext filterContext, string validationToken) { var user = UserCore.GetByAspNetUserId(validationToken, new[] { nameof(User.AspNetUser) }); if (user == null) { //LogHelper.LogInfo<GlobalIdentityInjectorAttribute>("failed to retrieve user!"); return; } //if (!user.AspNetUser.WhitelabelId.HasValue) //{ // //LogHelper.LogInfo<GlobalIdentityInjectorAttribute>("user does not have WhitelabelId!"); // return; //} var identity = new CustomIdentity { Id = user.Id, AspNetUserId = validationToken, Username = user.AspNetUser.Email, //identity.Status = user.AspNetUser.Status; FirstName = user.FirstName, LastName = user.LastName, PhoneNumber = user.AspNetUser.PhoneNumber, ProfileImageUrl = user.ProfilePictureUrl }; SetIdentity(filterContext, identity, user.AspNetUser); }