Ejemplo n.º 1
0
        public void UpdateUser(Guid id, User user)
        {
            var userCommon = _userBusinessLogic.GetById(id);

            userCommon.AppUser.UserName         = user.Username.Trim();
            userCommon.AppUser.ContactFirstName = user.FirstName.Trim();
            userCommon.AppUser.ContactLastName  = user.LastName.Trim();
            userCommon.AppUser.ContactEmail     = user.Email.Trim();
            _userBusinessLogic.UpdateUserData(id, userCommon);
        }
Ejemplo n.º 2
0
        private bool ChangePasswordInfo(PassInfo model)
        {
            bool response = false;

            try
            {
                var            accountUser    = _userBusinessLogic.GetById(Guid.Parse(model.UserId));
                MembershipUser membershipUser = Membership.GetUser(accountUser.AppUser.UserName);
                if (membershipUser != null)
                {
                    response = membershipUser.ChangePassword(accountUser.AppUser.PasswordHash, model.NewPassword);
                }
            }
            catch (Exception e)
            {
                throw e;
            }

            return(response);
        }