public void RecoverPassword(PasswordRecover model, IBusinessErrorCollection errors)
        {
            if (!model.Validate(errors))
            {
                return;
            }

            var user = UserManager.FindByEmail(model.Email);
            if (user == null)
            {
                errors.Add("", "Invalid email");
                return;
            }

            var code = UserManager.GeneratePasswordResetToken(user.Id);

            var recoverUrl = string.Format(model.LinkTemplate,
                Uri.EscapeDataString(user.Id),
                Uri.EscapeDataString(code));

            Emailer.SendPasswordRecoveryEmail(user.Email, recoverUrl);
        }
        public virtual ActionResult RecoverPassword(PasswordRecoverViewModel model)
        {
            var recoverUlrTemplate = string.Format("{0}?userId={{0}}&code={{1}}", this.Url.ActionAbsolute(MVC.Accounts.ResetPassword()));

            var blModel = new PasswordRecover()
                              {
                                  Email = model.Email,
                                  LinkTemplate = recoverUlrTemplate
                              };

            return Handle(blModel, AccountService.RecoverPassword,
                RedirectToAction(MVC.Accounts.Login()),
                RedirectToAction(MVC.Accounts.RecoverPassword()),
                "Check your email for recovery password link");
        }