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:
@@ -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("/");
|
||||
|
||||
Reference in New Issue
Block a user