Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] duplicate username problem

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
11 years 5 months ago - 11 years 3 months ago #227923 by comyoo
[SOLVED] duplicate username problem was created by comyoo
Hi,

We use CB on a website for a customer ( www.de4emusketier.nl )

There are over 3500 users and we have the problem that someone can't create an account because the username is not available anymore. But we let them login with emailadres and won't let them see or change the username.

Can we set CB to use always emailadres as username and / or copy/sync the emailadres as username?

Now and then users have the same names, but we don't want to add them manually.

I hope you can help me.
Last edit: 11 years 3 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #227954 by krileon
Replied by krileon on topic duplicate username problem
You can force the username to email address using CB Auto Actions. Example as follows.

Type: Field
Trigger: onAfterUserRegistration
Access: Everybody
Field: Username
Operator: Set
Value:
Code:
[email]

This won't fix existing users though, you'll need to fix them manually (database query ran on your database directly can be used to do this 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.

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

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
11 years 5 months ago #227994 by comyoo
Replied by comyoo on topic duplicate username problem
Thank you; will try this.

Is this fix also working when someone changes his e-mailadress?

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

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
11 years 5 months ago #227995 by comyoo
Replied by comyoo on topic duplicate username problem
Tried the trigger you adviced, but it does not work.

These are my setting; Please have a look at the attachment.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #228022 by krileon
Replied by krileon on topic duplicate username problem
It only works after registration. If you need it to work after profile update then you need add the after profile update trigger to the triggers variable (it's in the triggers dropdown). This usage is already confirmed working by multiple users so it does work (also confirmed it working) unless you've something else doing a save after the action that's reverting the change.


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.

  • comyoo
  • comyoo
  • OFFLINE
  • Posts: 87
  • Thanks: 1
  • Karma: 0
11 years 4 months ago - 11 years 4 months ago #228419 by comyoo
Replied by comyoo on topic duplicate username problem
And what does the onAfterUserRegistration different from the onStartSaveUserRegistration ?

Because when someone types his or her name and it is the same as someone else, the error occurs when the hit the button register.

beceause with my settings the message 'username exist' still exists.

The trigger onAfterUpdate does works.

As attachment my settings again.
Attachments:
Last edit: 11 years 4 months ago by comyoo. Reason: added information to make more clear my question and added a screenshot

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

Moderators: beatnantkrileon
Powered by Kunena Forum