Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime

[SOLVED] Random number + first name + last name as URL profile

  • crony
  • crony
  • OFFLINE
  • Posts: 104
  • Thanks: 7
  • Karma: 1
2 years 3 months ago - 2 years 3 months ago #330440 by crony
Hello,
I see in CB config that I may change the username fallback, and set it to the mail. Perfect.
Now I see the user id+email is used into lists and user profile links.
I'd rather have a random number+first name + laste name.

I see the "Your profil URL" native field, and tried to play a bit with it, adding anything into those fields, but that does not affect the url at all.
Could you indicate what I4m missing, or if my approach is not the right one ?

I guess the random number should be any timestamp at registration, but what I want to make sure is that this random number + first name + last name becomes the username at all ! I like my users to be using their mail to login...

Is there a "concatenate" field type or some additionnal parameters for the profile url ?
Thanks !

J! 4.x - CB 2.7.3
Last edit: 2 years 3 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
2 years 3 months ago #330445 by krileon
You can set "Username Fallback" to "Randomly Generated" if you want it truly random. There's no option for random number + name. It's possible to also set "Username Fallback" to "Name", but I don't recommend it since names are not unique.

The alternative is you'll have to implement your own method of generating usernames using CB Auto Actions. The following topic provides an example of how to do this early enough in the registration process.

www.joomlapolis.com/forum/developer-members-support/244706-generate-usernames?start=6#328354

Another option is to consider using the Profile URL field so users can have custom unique profile URLs, which can be set by CB Auto Actions as shown in the below example.

Global
Triggers: onAfterUserRegistration, onAfterNewUser, onAfterUpdateUser, onAfterUserUpdate
Type: Field
User: Automatic
Access: Everybody
Action
Field: Profile URL
Operator: Set
Value: [FIELD_NAME]


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.
The following user(s) said Thank You: crony

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

  • crony
  • crony
  • OFFLINE
  • Posts: 104
  • Thanks: 7
  • Karma: 1
2 years 3 months ago - 2 years 3 months ago #330450 by crony
Oh oh ! I like it simple like that ! (with the profile URL last option) Thanks :)
I've added a condition to set personnal profile url's and company's url based on a different patern, then I concatenate the register date, first name, last name, and populate the alias field (the profile URL)
Easy and working !
One thing a bit weird is that it seems to take a bit of time to have the links properly populated, I guess there's a cache somewhere, but that's a bit surprising !
Some screenshot to help the others if needed.
 
 

J! 4.x - CB 2.7.3
Last edit: 2 years 3 months ago by crony.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum