Refactored action results to use defaults

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-10-14 14:51:41 -07:00
parent 284576a62a
commit 477405bd3c
8 changed files with 14 additions and 14 deletions

View File

@@ -56,7 +56,7 @@ namespace Orchard.Users.Controllers {
if (_authenticationService.GetAuthenticatedUser() != null)
return Redirect("~/");
return View("LogOn", new LogOnViewModel {Title = "Log On"});
return View(new LogOnViewModel {Title = "Log On"});
}
[HttpPost]
@@ -65,7 +65,7 @@ namespace Orchard.Users.Controllers {
public ActionResult LogOn(string userNameOrEmail, string password, bool rememberMe, string returnUrl) {
var user = ValidateLogOn(userNameOrEmail, password);
if (!ModelState.IsValid) {
return View("LogOn", new LogOnViewModel {Title = "Log On"});
return View(new LogOnViewModel {Title = "Log On"});
}
_authenticationService.SignIn(user, rememberMe);