Example #1
0
        public ActionResult ConfirmForgotPassword(string userCode, string usernameCode, string emailCode)
        {
            try
            {
                if (userCode != null && usernameCode != null)
                {
                    string userID   = AESSecurity.DecryptPassword(userCode);
                    string username = AESSecurity.DecryptPassword(usernameCode);
                    //string email = AESSecurity.DecryptPassword(emailCode.Replace("+", " "));

                    var modelObj = Newtonsoft.Json.JsonConvert.SerializeObject(userID);
                    TempData["_ForgotPassword"] = modelObj;

                    return(RedirectToAction("CreateNewPassword", "Privileged"));
                }
            }
            catch (MySqlException MysqlEx)
            {
                ViewBag.MysqlEx = MysqlEx.Message.ToString();
            }
            catch (ArgumentException arEx)
            {
                throw new ArgumentException("Your Exception : " + arEx.Message.ToString());
            }
            catch (Exception ex)
            {
                throw new Exception("Your Exception : " + ex.Message.ToString());
            }

            return(Ok());
        }