Update password field in db, set null for uninitialized

This commit is contained in:
2013-02-12 20:22:49 -05:00
parent e2498b5270
commit 709ec249a2
8 changed files with 83 additions and 15 deletions
+11 -5
View File
@@ -43,11 +43,17 @@ namespace MileageTraker.Web.Controllers
catch (UserLockedOutException)
{
ModelState.AddModelError("",
"Too many failed password attempts for " +
model.Username + ". Account is locked. " +
@"Use 'Forgot Password' or contact " +
"administrator to unlock."
);
"Too many failed password attempts for " +
model.Username + ". Account is locked. " +
@"Use 'Forgot Password' or contact " +
"administrator to unlock.");
}
catch (UninitializedAccountException)
{
ModelState.AddModelError("",
"Account for " +
model.Username + " has not been initialized. " +
@"Please check your email for initialization instructions.");
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ using System.Linq;
using System.Web.Mvc;
using System.Web.Security;
using MileageTraker.Web.Attributes;
using MileageTraker.Web.DAL;
using MileageTraker.Web.Email;
using MileageTraker.Web.Utility;
using MileageTraker.Web.ViewModels;
@@ -109,7 +110,7 @@ namespace MileageTraker.Web.Controllers
var membershipUser =
Membership.CreateUser(
viewModel.Username,
"uninitialized_state",
CodeFirstMembershipProvider.UninitializedPassword,
viewModel.Email,
null,
null,