diff --git a/src/Umbraco.Web/Controllers/UmbLoginController.cs b/src/Umbraco.Web/Controllers/UmbLoginController.cs index 3ae00f6970..e86e48a18b 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginController.cs @@ -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(); } diff --git a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs index 07695ea214..9bb8ae7c9a 100644 --- a/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs +++ b/src/Umbraco.Web/Controllers/UmbLoginStatusController.cs @@ -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(); } } diff --git a/src/Umbraco.Web/Controllers/UmbProfileController.cs b/src/Umbraco.Web/Controllers/UmbProfileController.cs index d8e3d40e04..b45723ed30 100644 --- a/src/Umbraco.Web/Controllers/UmbProfileController.cs +++ b/src/Umbraco.Web/Controllers/UmbProfileController.cs @@ -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(); } } diff --git a/src/Umbraco.Web/Controllers/UmbRegisterController.cs b/src/Umbraco.Web/Controllers/UmbRegisterController.cs index 5f0e864cae..f9665f713e 100644 --- a/src/Umbraco.Web/Controllers/UmbRegisterController.cs +++ b/src/Umbraco.Web/Controllers/UmbRegisterController.cs @@ -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) diff --git a/src/Umbraco.Web/Models/RegisterModel.cs b/src/Umbraco.Web/Models/RegisterModel.cs index 51217d1b1f..237f6d7845 100644 --- a/src/Umbraco.Web/Models/RegisterModel.cs +++ b/src/Umbraco.Web/Models/RegisterModel.cs @@ -28,7 +28,6 @@ namespace Umbraco.Web.Models { MemberTypeAlias = Constants.Conventions.MemberTypes.DefaultAlias; RedirectOnSucces = false; - RedirectUrl = "/"; UsernameIsEmail = true; MemberProperties = new List(); LoginOnSuccess = true;