Skip to Content Skip to Menu

Custom field not working as username fallback

3 years 11 months ago - 3 years 11 months ago #321616 by fruitionnz
Hey team,

I have a custom field in community builder which is essentially [firstname][lastname]@domain.com.

When I set this field as the username fallback, it does not work when registering and as a result the username defaults to the email that a user signed up with. If i set the username fallback to anything else, such as just firstname, it works properly.

Is there any way to set the username to this custom field ( [firstname][lastname]@domain.com ) upon registration? We are not asking for a username upon registration as we want to set it to this ourselves

Thanks!!

Edit: A little more info - after a user has registered, when I look at CB -> User Management -> User, the custom field does show up and it is correct with the format above. My main thought is that perhaps this field is set after registration - after the username fallback is already set, and that is why it works for a field such as firstname but not this custom field?
Again that's just a bit of rambling on what I think COULD be happening behind the scenes - any solutions or advice is much appreciated!

Cheers
Last edit: 3 years 11 months ago by fruitionnz. Reason: More info

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 years 11 months ago - 3 years 11 months ago #321647 by krileon
Replied by krileon on topic Custom field not working as username fallback
You can not use a Custom HTML field for a username fallback. It needs to have storage so it could be a Text field for example.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 3 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

3 years 11 months ago - 3 years 11 months ago #321721 by fruitionnz
Replied by fruitionnz on topic Custom field not working as username fallback
Hi Kyle, thanks for that.

I attempted to repeat this but with a Text field rather than a custom email field and still could not get it working.

I've set all the value layouts of the text field to [firstname][lastname]@domain.com, and it appears correctly under user management. (The field is not visible on registration). The username fallback is set to this text field, however when creating a new account the username still defaults to the original email the user enters.

Is there something obvious I'm doing wrong here?

Thanks
Last edit: 3 years 11 months ago by fruitionnz.

Please Log in or Create an account to join the conversation.

3 years 11 months ago #321723 by fruitionnz
Replied by fruitionnz on topic Custom field not working as username fallback
As a side thought, I just learnt about CB auto actions - would it be possible to set the the custom username field on registration with this?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 years 11 months ago #321749 by krileon
Replied by krileon on topic Custom field not working as username fallback

I've set all the value layouts of the text field to [firstname][lastname]@domain.com, and it appears correctly under user management. (The field is not visible on registration). The username fallback is set to this text field, however when creating a new account the username still defaults to the original email the user enters.

Is there something obvious I'm doing wrong here?

The text field actually needs a value. So if you set it to a text field that text field should be available during registration.

As a side thought, I just learnt about CB auto actions - would it be possible to set the the custom username field on registration with this?

Yes, CB Auto Actions can alter the username during the registration process.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum