Updates the membership partial view templates to redirect to current page by default but allows this to be overridden. Creates a new RedirectToCurrentUmbracoUrl method which is slightly diff from RedirectToCurrentUmbracoPage since it doesn't care about the actual page item rendering, just the currently rendered URL which is useful if coming from a rewritten URL (which is what happens with public access rewrites)
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Web.Security;
|
||||
using umbraco.cms.businesslogic.member;
|
||||
using Umbraco.Web.Models;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Web.Controllers
|
||||
{
|
||||
@@ -24,7 +25,16 @@ namespace Umbraco.Web.Controllers
|
||||
return CurrentUmbracoPage();
|
||||
}
|
||||
|
||||
return Redirect("/");
|
||||
//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.Add("LoginSuccess", true);
|
||||
//return RedirectToCurrentUmbracoPage();
|
||||
return RedirectToCurrentUmbracoUrl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user