Exemple #1
0
        public IActionResult AlterTextField(string field, string newText)
        {
            int userId = (int)HttpContext.Session.GetInt32("UserId");

            if (field == "fld_password")
            {
                newText = MollShopContext.SaltNHash(newText);
            }
            MollShopContext.UpdateVarCharField("tbl_userdata", field, newText.ToString(), "fld_UserId", userId);

            return(RedirectToAction("MyAccount", "Account"));
        }