# Login split error messages

**URL:** <https://community.modx.com/t/login-split-error-messages/6732>\
**Category:** Extras\
**Created:** [May 22, 2023, 12:11pm UTC](https://community.modx.com/t/login-split-error-messages/6732 "2023-05-22T12:11:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![krava](https://community.modx.com/letter_avatar_proxy/v4/letter/k/ebca7d/32.png) [@krava](https://community.modx.com/u/krava)\
**Post date:** [May 22, 2023, 12:11pm UTC](https://community.modx.com/t/login-split-error-messages/6732/1 "2023-05-22T12:11:39Z")

</div>

Hello!  
Is there any way to split error messages (username and password), when authentication fails?  
At this moment I can get only one common error in [[+errors]] placeholder.  
The code in the Login controller does not do it `core/components/login/controllers/web/Login.php`

 ![изображение](https://modx-community.s3.dualstack.us-east-1.amazonaws.com/original/2X/5/5f87181e818661fd0752d7de3af492e2904e1b78.png)

Thank you.

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [May 22, 2023, 1:17pm UTC](https://community.modx.com/t/login-split-error-messages/6732/2 "2023-05-22T13:17:40Z")

</div>

The _Login_ extra uses the normal MODX “security/login” processor.  
So you should be able to change the lexicon strings `login_cannot_locate_account` and `login_username_password_incorrect` (Namespace = core | Topic = login) to differentiate between a wrong username and a wrong password.

* * *

But for _security reasons_, it’s usually better to keep the error ambivalent.  
Also, this change will affect the manager-login as well.
