public ActionResult Register(ApplicationUser user, string password, string view, string redirectView, string redirectCntroller = "")
 {
     var result = _userStore.UserManager.Create(user, password);
     if (result.Succeeded)
         return string.IsNullOrEmpty(redirectCntroller)
             ? RedirectToActionPermanent(redirectView)
             : RedirectToActionPermanent(redirectView, redirectCntroller);
     result.Errors.ToList().ForEach(x => ModelState.AddModelError("CreateUser", x));
     return View(view, user);
 }
 public ActionResult RegisterPost(UserInfo user)
 {
     if (!ModelState.IsValid) return View();
     var applicationUser = new ApplicationUser
     {
         FirstName = user.FirstName,
         LastName = user.LastName,
         Email = user.Email,
         PhoneNumber = user.PhoneNumber,
         UserName = user.UserName,
         LastLoginTime = DateTime.Now,
         Activated = true,
         SecurityQuestionId = user.SecurityQuestionId,
         SecurityAnswer = user.SecurityAnswer
     };
     return _userRepository.Register(applicationUser, user.Password, "Register", "Index");
 }
 public ActionResult Register(ApplicationUser applicationUser, string password, string view, string redirectView,
     string redirectCntroller = "")
 {
     return _userRepository.Register(applicationUser, password, view, redirectView, redirectCntroller);
 }