Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When synching a user group to a mailing-list, you cannot choose fullName - only firstname or lastname. #452

Closed
outline4 opened this issue Feb 7, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@outline4
Copy link

outline4 commented Feb 7, 2024

Hi,

We have Craft 4.5.13 with only fullNames in user profiles.

Now when we synch a user group to a mailing list we get uncomplete names, because we can only choose either firstname or lastname.

For instance one user was telling us that instead of "Guten Tag Alpines Museum der Schweiz" he got a newsletter with "Guten Tag Schweiz". Which is funny, but not apparently not appreciated by them.

It would be nice if in the dropdown there was "Full Name" option:

Bildschirmfoto 2024-02-07 um 08 36 33

Campaign is on version 2.12.0

Cheers
Stefan

@outline4 outline4 added the bug Something isn't working label Feb 7, 2024
@bencroker
Copy link
Collaborator

Wow, that’s a funny coincidence! I assume that is because of the “der” in the name. So does that mean you were only outputting the last name? You should still be able to output the first name followed by the last name, which will be equivalent to the full name.

@outline4
Copy link
Author

outline4 commented Feb 7, 2024

My specific problem is the we only have one name field in the mailing List. So synching the full name would be a great option.

Also, we don't have firstname and lastname in the user section anymore. Just one name field.

Bildschirmfoto 2024-02-07 um 13 56 11

So it would make sense to have a "full name" synch option. Woudn't it?

Otherwise I could add a second name field that holds the firstname, only for the user group synch? hm?

Cheers
Stefan

@bencroker
Copy link
Collaborator

Yes, but the first and last name still exist on a user, even if you can’t see them. Craft breaks the full name into two segments on save. So outputting a synced first and last name should still work. Can you please confirm?

@outline4
Copy link
Author

outline4 commented Feb 8, 2024

No, it doesn't do it correctly.

{{ user.fullName }}

vs.

{{ user.firstName }} {{ user.lastName }}

E.g. "Amt für Umwelt und Energie, Kanton Bern" will become "Amt Kanton Energie".
or "Alpines Museum der Schweiz" will become "Alpines der Schweiz"
or "APUS BIRDING / Orthoptera.ch" becomes "Apus Orthoptera.Ch"

I guess it takes the first two words as firstName and the last word as lastName

@bencroker
Copy link
Collaborator

bencroker commented Feb 8, 2024

That’s interesting! I guess it can be controlled using the config settings listed here: https://craftcms.com/docs/4.x/config/general.html#users

Nevertheless, I’ve added syncing of the fullName field from users to contacts, provided it exists on the contact field layout in 36a80c3 and released in 2.12.1. Note that you’ll need to create a fullName field and assign it to contacts.

@outline4
Copy link
Author

outline4 commented Feb 9, 2024

Thanks a lot for this!

It all works out ♥️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants