Fixing validation messages not displayed when using ShapeResult

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-01-10 15:49:56 -08:00
parent 901b77aed6
commit 10eb50c2ec
2 changed files with 6 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ namespace Orchard.Users.Controllers {
if (currentUser == null) {
Logger.Information("Access denied to anonymous request on {0}", returnUrl);
var shape = _orchardServices.New.LogOn().Title(T("Access Denied").Text);
return new ShapeResult(shape);
return new ShapeResult(this, shape);
}
//TODO: (erikpo) Add a setting for whether or not to log access denieds since these can fill up a database pretty fast from bots on a high traffic site
@@ -59,7 +59,7 @@ namespace Orchard.Users.Controllers {
return Redirect("~/");
var shape = _orchardServices.New.LogOn().Title(T("Log On").Text);
return new ShapeResult(shape);
return new ShapeResult(this, shape);
}
[HttpPost]
@@ -69,7 +69,7 @@ namespace Orchard.Users.Controllers {
var user = ValidateLogOn(userNameOrEmail, password);
if (!ModelState.IsValid) {
var shape = _orchardServices.New.LogOn().Title(T("Log On").Text);
return new ShapeResult(shape);
return new ShapeResult(this, shape);
}
_authenticationService.SignIn(user, false);