Answers.Body: <p>There is not a built-in way. If you take a look at the <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UserSessionService.php#L726" rel="nofollow"><code>UserSessionService</code></a>, you'll see that messages are returned based on an error code. When a username and password combination fail, it triggers this single message to be returned.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-16T18:20:45.770Z
Answers.LastActivityDate: 2015-04-16T18:20:45.770Z
Answers.UserDisplayName: Aaron Berkowitz
Body: <p>Hoping this is possible. I want to split the username and password error message to return it separately depending whether it is username or password that is incorrect and not just a the generic (Invalid username or password) message. How do I go about this? I don't require answers as to whether it is more secure or not just whether it is possible.</p>
  
  <p>Cheers</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-16T14:44:43.067Z
Comments.Text: Are you hoping to do this on the main craft login page or a custom form?
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-16T15:10:43.490Z
Comments.Text: @AaronBerkowitz Custom form.
Comments.UserDisplayName: Lettie
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-16T15:30:37.207Z
Comments.Text: I don't believe there is a built-in way. If you take a look at the [`UserSessionService`](https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UserSessionService.php#L726), you'll see that messages are returned based on an error code. When a username and password combination fail, it triggers this single message to be returned.
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-16T16:11:29.287Z
Comments.Text: @AaronBerkowitz hmmm looks like that is the default message and there is no code for just username or password error although on the registration form it does split the 2 input fields. I wonder if there is a way of extending this with a plugin?
Comments.UserDisplayName: Lettie
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-16T17:47:16.020Z
Comments.Text: Yeah, nothing's stopping you from making a plugin that provides it's own login implementation. @AaronBerkowitz - Mind adding that as an answer?
Comments.UserDisplayName: Brad Bell
Tags: <users><form><login><error-templates>
Title: How to split the user login error message between username and password?
ThreadText: # How to split the user login error message between username and password?
  
  (Asked by: username_0 on 2015-04-16)
  
  Hoping this is possible. I want to split the username and password error message to return it separately depending whether it is username or password that is incorrect and not just a the generic (Invalid username or password) message. How do I go about this? I don't require answers as to whether it is more secure or not just whether it is possible.
  
  Cheers
  
  **Tags:** users, form, login, error-templates
  
  > **Comments:**
  > **username_1**: Are you hoping to do this on the main craft login page or a custom form?  
  > **username_0**: @username_1 Custom form.  
  > **username_1**: I don't believe there is a built-in way. If you take a look at the [`UserSessionService`](https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UserSessionService.php#L726), you'll see that messages are returned based on an error code. When a username and password combination fail, it triggers this single message to be returned.  
  > **username_0**: @username_1 hmmm looks like that is the default message and there is no code for just username or password error although on the registration form it does split the 2 input fields. I wonder if there is a way of extending this with a plugin?  
  > **username_2**: Yeah, nothing's stopping you from making a plugin that provides it's own login implementation. @username_1 - Mind adding that as an answer?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-16. Score: 1 | Accepted answer
  
  There is not a built-in way. If you take a look at the [`UserSessionService`](https://github.com/pixelandtonic/Craft-Release/blob/master/app/services/UserSessionService.php#L726), you'll see that messages are returned based on an error code. When a username and password combination fail, it triggers this single message to be returned.
  
  
  ---
  
  