Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Numeric usernames / numeric membership ID's.

  • rebreanu
  • rebreanu
  • OFFLINE
  • Posts: 10
  • Thanks: 3
  • Karma: 0
13 years 11 months ago - 13 years 10 months ago #152046 by rebreanu
Hello everybody.

I wish to have a feature on CB backend admin with the option (check box) "Use numeric usernames as users ID's" and a field with e.g. "user range ID's starting from 10001 (variable, the range must be completed by admin depending on how many users he thinks to have on the website) and end with (variable) 99999.

This means if I check this box and fill the start and end ID range, when a new user register on the website, he only complete the name field, email field and pass/verify pass fields. When the user hit the Register button, the CB script gives to this new user the next numeric ID available in user ID table which will be used by joomla, CB and all others plgins as USERNAME (yes, numeric usernames, read old posts on the forum about this!).

E.g. The user John Smith will get an email after his registration with the following:

"Thank you for registering on bla bla bla.
You can now login with your email address xxx@yyy.zzz and the pass 12345 OR YOU CAN LOGIN WITH YOUR MEMBERSHIP ID 468578 (and this is THE USERNAME for joomla, CB, kunena and all others plugins that need the username from the user table/database in order to work properly) and your pass 12345 to register."

In the most cases, everybody will use the email / pass combination to login on the site. If someone will use his numeric ID /pass combination it is good as well.

PLEASE READ ABOUT THE FUNCTIONALITY!

If we use this feature, we do not longer need to have "bibi123" or "gogothemasteroftime12" usernames on our sites and have real names for the braves users or DECENT NUMERIC MEMBERS ID's for the users that want to stay anonymous.

ALSO, WE GET RID OF THE (annoying) USERNAME FIELD FROM REGISTRATION PAGE (the numeric value for the username will be assigned automatically by the CB script on registration).

If enough peoples will read/vote my post maybe someday CB team (and I count on krileon for this) will implement this great feature.

Thank you.
Last edit: 13 years 10 months ago by rebreanu.
The following user(s) said Thank You: BlackSunel, Saphy

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

13 years 10 months ago #152396 by BlackSunel
Replied by BlackSunel on topic Re: Numeric usernames / numeric membership ID's.
This is an awesome idea! Hope the CB team will have this in mind!

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

  • rebreanu
  • rebreanu
  • OFFLINE
  • Posts: 10
  • Thanks: 3
  • Karma: 0
13 years 10 months ago #153249 by rebreanu

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/joomlapolis824/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 1435
SOLVED!

CB have this great feature out of the box! I only installed CB Fields plugin (can be found on Incubator area, professional membership only access).

In the CB Fields plugin I made the following trigger in less than a minute:

onAfterUserRegistration >field 'username'> set value equal to> [user_id]

or

onAfterUserRegistration >field 'username'> set value equal to> [firstname][user_id]

or

onAfterUserRegistration >field 'username'> set value equal to> this post . It is about email as username but you will get the idea of using the unique joomla user ID or any other field value as you wish as username, without needing the username field on the registration form!
The following user(s) said Thank You: nant

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
13 years 10 months ago #153266 by nant
Once again - THANK YOU for sharing your solution with the rest of the community.

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

  • justmebg
  • justmebg
  • OFFLINE
  • Posts: 23
  • Thanks: 1
  • Karma: 1
13 years 8 months ago #160620 by justmebg
I needed something similar and used a similar solution. I set a trigger to change a Member ID field to a prefix plus the Joomla unique member ID. I would prefer an autonumber that does not match any part of the Joomla id number, but this solution is certainly better than manually assigning member numbers like I used to!

Beth G

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

  • houfton
  • houfton
  • OFFLINE
  • Posts: 40
  • Thanks: 1
  • Karma: 0
13 years 6 months ago #165046 by houfton
I have just used this technique and it is great for new registrations, thank you.

I am trying to work out how to use it to change all my 500 existing Users' usernames to id numbers in one go. Any ideas?

Is there a trigger which acts simultaneously on all Users? I tried setting up an onAfterSyncUser and then did a Tools>Synchronize Users but nothing happened.

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

Moderators: beatnantkrileon
Powered by Kunena Forum