# Verbatim names shouldn't be titleized

**URL:** https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569
**Category:** Feature
**Created:** [4월 21, 2019, 1:57오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569 "2019-04-21T01:57:36Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tmcw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tmcw/32/138939_2.png) [@tmcw](https://meta.discourse.org/u/tmcw)
#### Post date: [4월 21, 2019, 1:57오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/1 "2019-04-21T01:57:36Z")

</div>

Hi!

My name is Tom MacWright. Every time I sign into a Discourse instance, it suggests that I should set my name as “Tom Mac Wright”. Like many folks from Scotland and Ireland, my name has a medial capital, or, in programming terms, is PascalCase.

Anyway, here’s my pitch: Discourse runs this [User.suggest\_name](https://github.com/discourse/discourse/blob/master/app/models/user.rb#L347-L350) method that uses titleize to turn MacWright into Mac Wright. Instead, that should only run when [you have only a username or an email here](https://github.com/discourse/discourse/blob/f645cb9c1463bc130f428fd4c59de3f8259a140b/lib/auth/result.rb#L74). Otherwise, someone put their name on GitHub (Git Hub?), and they likely meant it.

Thanks!

-Tom

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [4월 21, 2019, 2:27오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/2 "2019-04-21T02:27:35Z")

</div>

Well, thatmakessense 😉

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [4월 24, 2019, 2:25오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/3 "2019-04-24T02:25:06Z")

</div>

Hmm, so it looks like you are signing in via twitter? Maybe our managed authenticator is not getting name from twitter?

First I would like to confirm which flow needs improving.

---

<div class="post-metadata">

### Author: ![tmcw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tmcw/32/138939_2.png) [@tmcw](https://meta.discourse.org/u/tmcw)
#### Post date: [4월 24, 2019, 3:47오후 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/4 "2019-04-24T15:47:04Z")

</div>

Yes, I signed up here via Twitter. I think I’ve encountered the same bug via GitHub, though.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [4월 24, 2019, 3:57오후 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/5 "2019-04-24T15:57:52Z")

</div>

Yes, it looks like this applies to all authentication methods

> <https://github.com/discourse/discourse/blob/main/lib/auth/result.rb#L73-L75>

I think we can safely change that to

```plaintext
if SiteSetting.enable_names?
  result[:name] = name || User.suggest_name(username || email)
end

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [4월 29, 2019, 1:44오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/6 "2019-04-29T01:44:00Z")

</div>

> [@david](#):
>
> result[:name] = name || User.suggest\_name

Sure this change looks safe to me. Make it so!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [5월 13, 2019, 6:46오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/7 "2019-05-13T06:46:46Z")

</div>

OK let’s see if this cuts it @tmcw, may take a bit for it to find it’s way everywhere, but should be live on meta shortly.

[https://github.com/discourse/discourse/commit/3fbab595d9266dab5b139ef375387bc290cda0df](https://github.com/discourse/discourse/commit/3fbab595d9266dab5b139ef375387bc290cda0df)

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [5월 13, 2019, 7:19오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/8 "2019-05-13T07:19:23Z")

</div>

> [@sam](#):
>
> Make it so!

[https://www.youtube.com/watch?v=fM5F7NC7LSs](https://www.youtube.com/watch?v=fM5F7NC7LSs) !

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [5월 20, 2019, 8:00오전 UTC](https://meta.discourse.org/t/verbatim-names-shouldnt-be-titleized/115569/9 "2019-05-20T08:00:17Z")

</div>

This topic was automatically closed after 7 days. New replies are no longer allowed.
