# Render %{invitee\_name} as full name only

**URL:** https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412
**Category:** UX
**Created:** [May 10, 2017, 9:00am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412 "2017-05-10T09:00:30Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [May 10, 2017, 9:00am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/1 "2017-05-10T09:00:30Z")

</div>

When usernames are derived from emails (especially work emails), they often are very similar to the users real name. If the user has set their real name (and if real names are not hidden via site settings) this currently results in invite emails starting like this

> John Doe (doe) invited you to join

As far as I can tell without any knowledge of ruby, this is where the `John Doe (doe)` part gets rendered:

> <https://github.com/discourse/discourse/blob/2efe0442bf52ad4595e4a290ef24edea4fcbe20b/app/mailers/invite_mailer.rb#L15-L19>

I don’t see the benefit of mentioning the username at all if the real name is available. After all, you are inviting someone who is not yet a member (most of the time at least) and hence can’t relate to the username anyway. So I would like to change line 18 to

```
  invitee_name = "#{invite.invited_by.name}"

```

but I don’t know how to achieve this on my site and I’m also hesitant to fiddle with the core code. Is this a change that would make sense for the core? If not, could someone give me some hints how to make that change locally while maintaining upgradability?

BTW: why is the variable called `invitee_name` when “invitee” commonly designates the invited person, not the inviting person?

* * *

So, just to understand things better, does what I’m trying to do imply forking Discourse? I hope there is a simpler way for making such a minor change…

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [December 1, 2017, 12:25pm UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/2 "2017-12-01T12:25:08Z")

</div>

> [@tophee](#):
>
> why is the variable called invitee\_name when “invitee” commonly designates the invited person, not the inviting person?

I was about to create a #Contribute > Bug topic about this issue, but I’ll jump on this one and +1 it

‘Invitee’ definitely denotes the **person who has been invited**. The person who is doing the inviting should be the inviter/invitor. [https://english.stackexchange.com/questions/327842/person-who-invites-inviter-or-invitor](https://english.stackexchange.com/questions/327842/person-who-invites-inviter-or-invitor).

It’s particularly confusing when editing the email templates for Invites - I thought %{invitee\_name} would put in the name of the person I was inviting so I changed the sentences to reflect this, only for the invites to make no sense at all because %{invitee\_name} actually inserted the username of the person who created the invite.

I would support the OP in this topic who suggested the use of **full name** if it is available, as opposed to username, which can occasionally be a username that is opaque to the new user.

But we do need to change %{invit **ee** \_name} to %{invit **er** \_name} because it’s maddeningly confusing, and inaccurate. I might actually be able to do this, so if you’d be interested in a PR I will have a go.

---

<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: [December 1, 2017, 10:15pm UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/3 "2017-12-01T22:15:34Z")

</div>

Yeah this is bad and wrong, you are 100% correct. Not sure who worked on this originally, but they got it wrong.

- Invitee: person being invited

- Inviter: person sending the invitation

Can you add to your list @techAPJ?

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [December 2, 2017, 12:08pm UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/4 "2017-12-02T12:08:48Z")

</div>

> [@codinghorror](#):
>
> Invitee: person being invited
> 
> Inviter: person sending the invitation

What abour the main point of the OP? Do you intend to make that change too?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [December 4, 2017, 9:51am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/5 "2017-12-04T09:51:43Z")

</div>

> [@pacharanero](#):
>
> we do need to change %{invitee\_name} to %{inviter\_name}

Done via:

[https://github.com/discourse/discourse/commit/0e0794dff9e23f5ee5ba5f68a8a04f08254b4790](https://github.com/discourse/discourse/commit/0e0794dff9e23f5ee5ba5f68a8a04f08254b4790)

and

[https://github.com/discourse/discourse/commit/248ad5466d5009476fb7170e878096a3e343ec1c](https://github.com/discourse/discourse/commit/248ad5466d5009476fb7170e878096a3e343ec1c)

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [December 4, 2017, 9:53am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/6 "2017-12-04T09:53:32Z")

</div>

> [@tophee](#):
>
> I don’t see the benefit of mentioning the username at all if the real name is available.

I have created a PR for this:

[https://github.com/discourse/discourse/pull/5390](https://github.com/discourse/discourse/pull/5390)

@codinghorror can merge if he agrees. 🙂

---

<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: [December 5, 2017, 12:36am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/7 "2017-12-05T00:36:06Z")

</div>

> [@tophee](#):
>
> I don’t see the benefit of mentioning the username at all if the real name is available. After all, you are inviting someone who is not yet a member (most of the time at least) and hence can’t relate to the username anyway.

I disagree; you’ll need the username to mention the person properly. Also highly relevant if they are different:

`Joe Smith @ninja`

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [December 5, 2017, 2:34am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/8 "2017-12-05T02:34:22Z")

</div>

I don’t understand your point. Can you elaborate?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [December 5, 2017, 2:45am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/9 "2017-12-05T02:45:28Z")

</div>

I think often both could be needed.

If the invite said codinghorror only and I knew Jeff personally I might not have any idea who codinghorror was and be reluctant to accept the invite.

If the invite said Jeff only and I knew Jeff personally I would be more likely to accept the invite, but I might not know that his member name was codinghorror.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [December 5, 2017, 2:50am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/10 "2017-12-05T02:50:37Z")

</div>

> [@Mittineague](#):
>
> If the invite said codinghorror only and I knew Jeff personally I might not have any idea who codinghorror was and be reluctant to accept the invite.

That part is covered: the proposal is only to skip username if real name is available, not the other way around.

> [@Mittineague](#):
>
> If the invite said Jeff only and I knew Jeff personally I would be more likely to accept the invite, but I might not know that his member name was codinghorror.

I believe when you follow an invite link you get to see the name, username and avatar of the user who invited you. Is that not so?

---

<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: [December 6, 2017, 10:00am UTC](https://meta.discourse.org/t/render-invitee-name-as-full-name-only/62412/11 "2017-12-06T10:00:15Z")

</div>

This topic was automatically closed after 33 hours. New replies are no longer allowed.
