#28880 [Bug]: Users created with leading whitespace in email addresses should be trimmed
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
One of my team members was assisting a user who was unable to login after resetting their password in the UI; he found:
In the UI; if I create a user:
* Head to `https://[domain.tld]/ui/?page=users` * Select `+ Invite User` * Add a leading whitespace to the User Meail field ` somename@domain.tld` * `Invite User` to complete
I get a valid `Success: API user Created` message; the popup provides the `User ID` and `Invitation Link` for the user.
The Invitation Link can be provided to the user; they are able to use it to create a password; and are able to sign-in to the web UI.
However; when they log out; they are unable to log back in with the same username and password.
It appears the username is stored WITH leading whitespace; which should have been trimmed.
Attempting to login with the username and any password yields a `401 Unauthorized` for the `POST /v2/login` HTTP call; as the username (not containing whitespace does not match any record.
Though TECHNICALLY not an RFC violation; I cannot think of any practical r…