UpdateProfile() public method

public UpdateProfile ( User user, string emailAddress, bool emailAllowed ) : void
user User
emailAddress string
emailAllowed bool
return void
        public virtual ActionResult Edit(EditProfileViewModel profile)
        {
            var user = UserService.FindByUsername(Identity.Name);

            if (user == null)
            {
                return(HttpNotFound());
            }

            profile.EmailAddress           = user.EmailAddress;
            profile.Username               = user.Username;
            profile.PendingNewEmailAddress = user.UnconfirmedEmailAddress;
            UserService.UpdateProfile(user, profile.EmailAllowed);
            return(View(profile));
        }