Ejemplo n.º 1
0
        public ActionResult ChangeUserPassword(ChangeUserPasswordModel model, Guid userId)
        {
            if (ModelState.IsValid)
            {
                MembershipUser usr = Membership.GetUser(userId);
                usr.ChangePassword(usr.ResetPassword(), model.Password);
                Membership.UpdateUser(usr);
                return RedirectToAction("Index");
            }

            UserInfo nfo = db.UserInfos.Single(p => p.UserId == userId);
            GetOrgPosInfo(nfo);
            return View(model);
        }
Ejemplo n.º 2
0
        public ActionResult ChangeUserPassword(Guid userId)
        {
            UserInfo nfo = db.UserInfos.Single(p => p.UserId == userId);
            ChangeUserPasswordModel model = new ChangeUserPasswordModel();
            model.UserName = nfo.aspnet_User.UserName;
            model.FullName = nfo.FullName;
            model.JobTitle = nfo.JobTitle;
            model.IsRCP = nfo.IsRiskOwner;
            MembershipUser usr = Membership.GetUser(userId);
            model.Email = usr.Email;

            GetOrgPosInfo(nfo);
            return View(model);
        }