public IActionResult AccountLocked(string username)
        {
            if (String.IsNullOrEmpty(username))
            {
                return(RedirectToAction(nameof(Index)));
            }

            AccountLockedViewModel model = new AccountLockedViewModel(GetModelData(), username);

            return(View(model));
        }
        public IActionResult AccountLocked(string username)
        {
            if (String.IsNullOrEmpty(username))
            {
                RedirectToAction("Index");
            }

            AccountLockedViewModel model = new AccountLockedViewModel(username);

            return(View(model));
        }
        public IActionResult AccountLocked(AccountLockedViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            if (_loginProvider.UnlockAccount(model.Username, model.UnlockCode))
            {
                return(Redirect("/Login"));
            }

            ModelState.AddModelError("", "The unlock code you entered was not valid");
            model.UnlockCode = String.Empty;

            return(View(model));
        }
        public IActionResult AccountLocked(AccountLockedViewModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            if (_loginProvider.UnlockAccount(model.Username, model.UnlockCode))
            {
                return(Redirect("/Login"));
            }

            ModelState.AddModelError(String.Empty, Languages.LanguageStrings.CodeNotValid);
            model.UnlockCode  = String.Empty;
            model.Breadcrumbs = GetBreadcrumbs();
            model.CartSummary = GetCartSummary();

            return(View(model));
        }