#20999: Handling returnUrl also on the LogOn page.

WorkItem: 20999
This commit is contained in:
Lombiq
2014-10-17 13:43:40 +02:00
committed by Zoltán Lehóczky
parent 35823646cf
commit a798d974f7

View File

@@ -64,9 +64,9 @@ namespace Orchard.Users.Controllers {
}
[AlwaysAccessible]
public ActionResult LogOn() {
public ActionResult LogOn(string returnUrl) {
if (_authenticationService.GetAuthenticatedUser() != null)
return Redirect("~/");
return this.RedirectLocal(returnUrl);
var shape = _orchardServices.New.LogOn().Title(T("Log On").Text);
return new ShapeResult(this, shape);