Verbatim names shouldn't be titleized

(Tom MacWright) #1

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 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. Otherwise, someone put their name on GitHub (Git Hub?), and they likely meant it.

Thanks!

-Tom

8 Likes
(Jeff Atwood) #2

Well, thatmakessense :wink:

5 Likes
(Sam Saffron) #3

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.

2 Likes
(Tom MacWright) #4

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

1 Like
(David Taylor) #5

Yes, it looks like this applies to all authentication methods

I think we can safely change that to

if SiteSetting.enable_names?
  result[:name] = name || User.suggest_name(username || email)
end
9 Likes
(Sam Saffron) #6

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

5 Likes
(Sam Saffron) #7

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.

4 Likes
#8

YouTube !

(Sam Saffron) closed #9

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