Skip to Content Skip to Menu

Auto Username

10 years 5 months ago - 10 years 5 months ago #246974 by PresidenteMensaMexico
Auto Username was created by PresidenteMensaMexico
Hello
Is it possible to automatically assign new members a username? I need to assign a number in ascending order to all new registrants as their username.

Thanks for your help
Last edit: 10 years 5 months ago by PresidenteMensaMexico.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48671
  • Thanks: 8312
  • Karma: 1446
10 years 5 months ago #246990 by krileon
Replied by krileon on topic Auto Username
You can use CB Auto Actions and a Query action, Code action, or Field action to accomplish this. Which method you use is up to you. Query could be a direct query to _users to alter the row of the user. Code could be a Joomla API or preferably CB API call to change and store the user. Field would do the storing for you, but you won't be able to really do any logic here.


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.

  • mhs_cb
  • mhs_cb
  • OFFLINE
  • Posts: 53
  • Thanks: 0
  • Karma: 0
10 years 5 months ago #247606 by mhs_cb
Replied by mhs_cb on topic Auto Username
A similar case was mentioned here:

www.joomlapolis.com/forum/87-presales/225002-autogenerate-username#247604

The proposed solution was similar: "use a Code action on the before registration trigger and alter the POST of username to whatever you want".

In my case, I need the username to be 10 random digits. Does anyone know what a PHP code would look like that would accomplish this (that I can put into the Auto Action code section)?

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

  • pipermac
  • pipermac
  • OFFLINE
  • Posts: 70
  • Thanks: 1
  • Karma: 0
10 years 1 month ago #252959 by pipermac
Replied by pipermac on topic Auto Username
I notice there really isnt an answer here. Could someone explain exactly how to do this? I would like to be able to do this.

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

Moderators: beatnantkrileon
Powered by Kunena Forum