BgEngine.Controllers.AccountController.ConfirmAccount C# (CSharp) Метод

ConfirmAccount() приватный Метод

private ConfirmAccount ( string id, string user ) : System.Web.Mvc.ActionResult
id string
user string
Результат System.Web.Mvc.ActionResult
        public ActionResult ConfirmAccount(string id, string user)
        {
            //string confirmationToken = id.Replace("backslash", "/").Replace("percent", "%").Replace("ampersand", "&").Replace("space", " ");
            User userobj = AccountServices.FindUser(usr => usr.Username == user);
            if ((userobj != null) && (userobj.IsConfirmed == true))
            {
                throw new Exception(String.Format(Resources.AppMessages.Error_User_Is_Confirmed,user));
            }
            try
            {
                if (CodeFirstSecurity.ConfirmAccount(id))
                {
                    FormsAuthentication.SetAuthCookie(user, false);
                    return RedirectToRoute("Default", new { controller = "Account", action = "RegistrationSuccesfull" });
                }
                else
                {
                    throw new Exception(Resources.AppMessages.Error_ConfirmAccount);
                }
            }
            catch (Exception)
            {

                throw new Exception(Resources.AppMessages.Error_ConfirmAccount);
            }
        }