Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] Use email address as username AND still be able to use name field.

  • kiper
  • kiper
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 2 months ago - 12 years 2 months ago #214854 by kiper
Hi, I am using Joomla 3 with CB 1.9 and want to be able to use email address as username.
I think this should be the default setting for CB in this age since so many services do just this.
I was able to register the email address as username BUT ONLY when the registration form is empty of ANY name fields. The problem is that I really want to be able to register the name of my users as well...

Have I missed a setting or is this not possible in CB?
Last edit: 12 years 2 months ago by krileon.

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

  • kiper
  • kiper
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 2 months ago - 12 years 2 months ago #214855 by kiper
Quick hack solution:
Find line 1496 in /administrator/components/com_comprofiler/library/cb/cb.tables.php
and change it to the following:
Code:
if ( ( $this->username == '' ) && ( $this->email != '' ) ) {

Please observe that the quotes are single quotes: '.
Last edit: 12 years 2 months ago by kiper.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214867 by krileon
Disable the username field then use CB Auto Actions in a field action with the after registration trigger to set username to


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.

  • kiper
  • kiper
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 2 months ago #214886 by kiper
Thank you for the answer krileon, but why is this setting not possible within vanilla CB? Or why not even default?

Otherwise I must say that I really like the new version (1.9)! Especially with the bootstrap template.

Thanks for all the great work!

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
12 years 2 months ago #214891 by nant

kiper wrote: Thank you for the answer krileon, but why is this setting not possible within vanilla CB? Or why not even default?

Otherwise I must say that I really like the new version (1.9)! Especially with the bootstrap template.

Thanks for all the great work!


We will be improving this with next CB versions (starting with CB 2.0).

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

  • kiper
  • kiper
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
12 years 2 months ago #214954 by kiper
Thanks nant, great to know!

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

Moderators: beatnantkrileon
Powered by Kunena Forum