// // GET: /Admin/Users public ActionResult Users(Guid?id, short count = 10) { if (id.HasValue && Guid.Empty != id.Value) { var profile = profileCore.SearchSingle <ProfileFull>(id.Value, null, null, true); if (null != profile) { if (!string.IsNullOrWhiteSpace(profile.FacebookAccessToken)) { var fbCore = new FacebookCore(); if (string.IsNullOrWhiteSpace(profile.Location)) { profile.Location = fbCore.Location(profile.FacebookAccessToken); if (!string.IsNullOrWhiteSpace(profile.Location)) { profileCore.Save(profile); } } var emails = fbCore.ImportFriends(profile); foreach (var email in emails) { emailCore.FriendSignedUp(email); } } } } return(View(this.adminCore.Profiles(count))); }
public Profile SaveProfile(Profile profile) { if (null == profile) { throw new ArgumentNullException("profile"); } profile.Identifier = User.Identifier(); return(profileCore.Save(profile)); }