Example #1
0
        public virtual ActionResult Post(SignUpForm model)
        {
            if (model == null) return HttpNotFound();

            if (!ModelState.IsValid) return View(model);

            // execute command
            var command = Mapper.Map<SendCreatePasswordMessageCommand>(model);
            command.SendFromUrl = Url.Action(MVC.Identity.SignOn.Get());
            _services.CommandHandler.Handle(command);

            // flash feedback message
            SetFeedbackMessage(string.Format(SuccessMessageFormat, model.EmailAddress));

            // redirect to confirm email
            return RedirectToRoute(new
            {
                area = MVC.Identity.Name,
                controller = MVC.Identity.ConfirmEmail.Name,
                action = MVC.Identity.ConfirmEmail.ActionNames.Get,
                token = command.ConfirmationToken,
            });
        }
Example #2
0
 public virtual ActionResult Get(string returnUrl)
 {
     var model = new SignUpForm(HttpContext, TempData, returnUrl);
     return View(model);
 }