Cleanup & Refactoring

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-12-07 17:11:55 -08:00
parent cc29bf9605
commit c15e4d5ee8
25 changed files with 40 additions and 49 deletions

View File

@@ -132,9 +132,8 @@ namespace Orchard.Users.Controllers {
_authenticationService.SignIn(user, false /* createPersistentCookie */);
return Redirect("~/");
}
else {
ModelState.AddModelError("_FORM", T(ErrorCodeToString(/*createStatus*/MembershipCreateStatus.ProviderError)));
}
ModelState.AddModelError("_FORM", T(ErrorCodeToString(/*createStatus*/MembershipCreateStatus.ProviderError)));
}
// If we got this far, something failed, redisplay form
@@ -196,11 +195,10 @@ namespace Orchard.Users.Controllers {
_membershipService.SetPassword(validated, newPassword);
return RedirectToAction("ChangePasswordSuccess");
}
else {
ModelState.AddModelError("_FORM",
T("The current password is incorrect or the new password is invalid."));
return ChangePassword();
}
ModelState.AddModelError("_FORM",
T("The current password is incorrect or the new password is invalid."));
return ChangePassword();
}
catch {
ModelState.AddModelError("_FORM", T("The current password is incorrect or the new password is invalid."));