Updates MembershipHelper to ensure that the membership provider is used when updating a profile, specifically to deal with unique emails. Updates the profile edit template to have correct validation procedures.

This commit is contained in:
Shannon
2014-02-10 16:22:15 +11:00
parent 4d2d656b3d
commit 2bb58b6fca
6 changed files with 73 additions and 8 deletions

View File

@@ -25,7 +25,14 @@ namespace Umbraco.Web.Controllers
return CurrentUmbracoPage();
}
Members.UpdateMemberProfile(model);
var updateAttempt = Members.UpdateMemberProfile(model);
if (updateAttempt.Success == false)
{
ModelState.AddModelError("profileModel.Email", updateAttempt.Exception);
return CurrentUmbracoPage();
}
TempData.Add("ProfileUpdateSuccess", true);
//TODO: Why are we redirecting to home again here??
return Redirect("/");