public void UpdateUserSocialNetworkUrls(UserIdentity userIdentity, ProfileSocialNetworkLinksPM profileSocialNetworkLinksPM)
        {
            var linkedInUrl = string.IsNullOrWhiteSpace(profileSocialNetworkLinksPM.LinkedInUrl) ? "" : profileSocialNetworkLinksPM.LinkedInUrl.Trim();
            var facebookUrl = string.IsNullOrWhiteSpace(profileSocialNetworkLinksPM.FacebookUrl) ? "" : profileSocialNetworkLinksPM.FacebookUrl.Trim();
            var twitterUrl  = string.IsNullOrWhiteSpace(profileSocialNetworkLinksPM.TwitterUrl) ? "" : profileSocialNetworkLinksPM.TwitterUrl.Trim();

            var profileKeyValues = new List <ProfileKeyValue>();

            profileKeyValues.Add(new ProfileKeyValue(ProfileKeyValueType.LinkedInUrl, linkedInUrl));
            profileKeyValues.Add(new ProfileKeyValue(ProfileKeyValueType.FacebookUrl, facebookUrl));
            profileKeyValues.Add(new ProfileKeyValue(ProfileKeyValueType.TwitterUrl, twitterUrl));

            ProfileBiz.SetUserProfile(userIdentity.UserId, profileKeyValues);
            UnitOfWork.SaveChanges();
        }
Esempio n. 2
0
 public ActionResult UpdateSocialNetworkUrls(ProfileSocialNetworkLinksPM profileSocialNetworkUrls)
 {
     UserProfileService.UpdateUserSocialNetworkUrls(User, profileSocialNetworkUrls);
     return(Json(""));
 }