<p>Yes it's simple until you find some lunatic has created a user with significant whitespace in their name...</p>
<p>I know that can't work for email but we allow either username or email for login and it's not completely trivial to trim one and not the other.</p>
<p>We don't currently allow leading or trailing whitespace for usernames but I need to check if that has always been the case ;-)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2173#issuecomment-470887111">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLdcc-Fkn-oK1bSiZdxGS5yc-b4K3ks5vUkALgaJpZM4blFmR">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLQY3hoKbkB8I_oRtO-JM3whf_x1yks5vUkALgaJpZM4blFmR.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@tomhughes in #2173: Yes it's simple until you find some lunatic has created a user with significant whitespace in their name...\r\n\r\nI know that can't work for email but we allow either username or email for login and it's not completely trivial to trim one and not the other.\r\n\r\nWe don't currently allow leading or trailing whitespace for usernames but I need to check if that has always been the case ;-)"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/2173#issuecomment-470887111"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2173#issuecomment-470887111",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2173#issuecomment-470887111",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>