diff --git a/Facts/Controllers/AuthenticationControllerFacts.cs b/Facts/Controllers/AuthenticationControllerFacts.cs index 7a84e25bf2..25edbf10a0 100644 --- a/Facts/Controllers/AuthenticationControllerFacts.cs +++ b/Facts/Controllers/AuthenticationControllerFacts.cs @@ -35,7 +35,7 @@ public void WillLogTheUserOnWhenTheUsernameAndPasswordAreValidAndUserIsConfirmed userSvc: userSvc); controller.LogOn( - new SignInRequest() { UserNameOrEmail = "theUsername", Password = "thePassword" }, + new SignInRequest() { UserName = "theUsername", Password = "thePassword" }, "theReturnUrl"); formsAuthSvc.Verify(x => x.SetAuthCookie( @@ -57,7 +57,7 @@ public void WillNotLogTheUserOnWhenTheUsernameAndPasswordAreValidAndUserIsNotCon userSvc: userSvc); controller.LogOn( - new SignInRequest() { UserNameOrEmail = "theUsername", Password = "thePassword" }, + new SignInRequest() { UserName = "theUsername", Password = "thePassword" }, "theReturnUrl"); } @@ -77,7 +77,7 @@ public void WillLogTheUserOnWithRolesWhenTheUsernameAndPasswordAreValidAndUserIs userSvc: userSvc); controller.LogOn( - new SignInRequest() { UserNameOrEmail = "theUsername", Password = "thePassword" }, + new SignInRequest() { UserName = "theUsername", Password = "thePassword" }, "theReturnUrl"); formsAuthSvc.Verify(x => x.SetAuthCookie( diff --git a/Website/Controllers/AuthenticationController.cs b/Website/Controllers/AuthenticationController.cs index 9c1e778d6c..02dd9ad51a 100644 --- a/Website/Controllers/AuthenticationController.cs +++ b/Website/Controllers/AuthenticationController.cs @@ -33,9 +33,8 @@ public virtual ActionResult LogOn(SignInRequest request, string returnUrl) if (!ModelState.IsValid) return View(); - // TODO: allow users to sign in with email address in addition to user name var user = userSvc.FindByUsernameAndPassword( - request.UserNameOrEmail, + request.UserName, request.Password); if (user == null) diff --git a/Website/RequestModels/SignInRequest.cs b/Website/RequestModels/SignInRequest.cs index f8d76ffbe1..a42220e090 100644 --- a/Website/RequestModels/SignInRequest.cs +++ b/Website/RequestModels/SignInRequest.cs @@ -6,8 +6,8 @@ public class SignInRequest { [Required] [Display(Name = "Username")] - [Hint("Enter either your username or email address.")] - public string UserNameOrEmail { get; set; } + [Hint("Enter your username.")] + public string UserName { get; set; } [Required] [DataType(DataType.Password)] diff --git a/Website/Views/Authentication/LogOn.generated.cs b/Website/Views/Authentication/LogOn.generated.cs index 745946429e..2bbe77749e 100644 --- a/Website/Views/Authentication/LogOn.generated.cs +++ b/Website/Views/Authentication/LogOn.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.239 +// Runtime Version:4.0.30319.488 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -45,7 +45,7 @@ public override void Execute() { -WriteLiteral("\n

Log On

\n\n

\n Don\'t have an account yet? Log On\r\n\r\n

\r\n Don\'t have an account yet? \n

\n\n"); +WriteLiteral("\">Register now.\r\n

\r\n\r\n"); @@ -65,7 +65,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("
\n Log On Form\n\n "); +WriteLiteral("
\r\n Log On Form\r\n\r\n "); @@ -75,7 +75,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n "); +WriteLiteral("\r\n "); @@ -85,7 +85,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n\n"); +WriteLiteral("\r\n\r\n"); @@ -104,7 +104,7 @@ public override void Execute() -WriteLiteral("

\n "); +WriteLiteral("

\r\n "); @@ -114,7 +114,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n

\n"); +WriteLiteral("\r\n

\r\n"); @@ -124,7 +124,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n "); +WriteLiteral("\r\n "); @@ -134,7 +134,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n\n \n\n \n "); +WriteLiteral("\" alt=\"Blue border on left means required.\" />\r\n\r\n \r\n "); @@ -155,7 +155,7 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n
\n"); +WriteLiteral("\r\n
\r\n"); @@ -165,12 +165,12 @@ public override void Execute() #line default #line hidden -WriteLiteral("\n"); +WriteLiteral("\r\n"); DefineSection("BottomScripts", () => { -WriteLiteral("\n \n \r\n \n"); +WriteLiteral("\">\r\n"); });