# Bug OP-6869 - Username attribute should not maintain whitespace

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-6869

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date | 2020-03-21 –  |
| Priority | Medium |
| Module |  |
| Target versions | 10.5.0 |
| Observed in versions | 10.4.0 |
| Sprint | 10.5.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 10.4.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

Your OpenProject Version: *10.4 community Edition*

Operating System / Browser / Language:

Windows/Chrome/English

### **Logs**

Are there errors in the browser console? ([Click here for information on how to open your browser's console](https://webmasters.stackexchange.com/a/77337)) For a local installation: Are there relevant logs output by `openproject logs` (packaged installation) or in a log/production.log or /var/log/openproject/ ? Please attach error output in these log files if applicable

### **Steps to reproduce:**

1.  A LDAP server is connected, login with uid
2.  An account with uid "test" in LDAP server.
3.  "on-the-fly" account creation is checked.
4.  Login with the account "test" in the first time,
5.  And then a new account "test" is created.
6.  Logout
7.  Login with the account " test", **A leading space before the account id test.**
8.  An account " test" is created

### **Actual Behavior**

Login with "test" and " test", two accounts were created.

### **Expected Behavior**

Login with "test" and " test", only one of them "test" will create.
