Update password field in db, set null for uninitialized
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user