Ensures tempdata is set on our member controllers in the correct place and ensures that the RegisterModel doesn't explicitly set the RedirectUrl because we want it to be empty by default.
This commit is contained in:
@@ -25,6 +25,8 @@ namespace Umbraco.Web.Controllers
|
||||
return CurrentUmbracoPage();
|
||||
}
|
||||
|
||||
TempData["LoginSuccess"] = true;
|
||||
|
||||
//if there is a specified path to redirect to then use it
|
||||
if (model.RedirectUrl.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
@@ -32,7 +34,7 @@ namespace Umbraco.Web.Controllers
|
||||
}
|
||||
|
||||
//redirect to current page by default
|
||||
TempData["LoginSuccess"] = true;
|
||||
|
||||
return RedirectToCurrentUmbracoPage();
|
||||
//return RedirectToCurrentUmbracoUrl();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace Umbraco.Web.Controllers
|
||||
FormsAuthentication.SignOut();
|
||||
}
|
||||
|
||||
TempData["LogoutSuccess"] = true;
|
||||
|
||||
//if there is a specified path to redirect to then use it
|
||||
if (model.RedirectUrl.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
@@ -31,7 +33,7 @@ namespace Umbraco.Web.Controllers
|
||||
}
|
||||
|
||||
//redirect to current page by default
|
||||
TempData["LogoutSuccess"] = true;
|
||||
|
||||
return RedirectToCurrentUmbracoPage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,14 +36,15 @@ namespace Umbraco.Web.Controllers
|
||||
return CurrentUmbracoPage();
|
||||
}
|
||||
|
||||
TempData["ProfileUpdateSuccess"] = true;
|
||||
|
||||
//if there is a specified path to redirect to then use it
|
||||
if (model.RedirectUrl.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
return Redirect(model.RedirectUrl);
|
||||
}
|
||||
|
||||
//redirect to current page by default
|
||||
TempData["ProfileUpdateSuccess"] = true;
|
||||
//redirect to current page by default
|
||||
return RedirectToCurrentUmbracoPage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,16 @@ namespace Umbraco.Web.Controllers
|
||||
switch (status)
|
||||
{
|
||||
case MembershipCreateStatus.Success:
|
||||
|
||||
TempData["FormSuccess"] = true;
|
||||
|
||||
//if there is a specified path to redirect to then use it
|
||||
if (model.RedirectUrl.IsNullOrWhiteSpace() == false)
|
||||
{
|
||||
return Redirect(model.RedirectUrl);
|
||||
}
|
||||
//redirect to current page by default
|
||||
TempData["FormSuccess"] = true;
|
||||
|
||||
return RedirectToCurrentUmbracoPage();
|
||||
case MembershipCreateStatus.InvalidUserName:
|
||||
ModelState.AddModelError((model.UsernameIsEmail || model.Username == null)
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace Umbraco.Web.Models
|
||||
{
|
||||
MemberTypeAlias = Constants.Conventions.MemberTypes.DefaultAlias;
|
||||
RedirectOnSucces = false;
|
||||
RedirectUrl = "/";
|
||||
UsernameIsEmail = true;
|
||||
MemberProperties = new List<UmbracoProperty>();
|
||||
LoginOnSuccess = true;
|
||||
|
||||
Reference in New Issue
Block a user