Replacing invalid characters in LDAP username

Allowing users with blank spaces in LDAP username to login / create a new user.
Space inside parentheses detected.<br>Prefer single-quoted strings when you don't need string interpolation or special symbols.