Generate Usernames

2 years 3 months ago #328342 by krileon
Replied by krileon on topic Generate Usernames
The onStartSaveUserRegistration trigger only recently started passing the user object through. Ensure you've the latest build release of CB installed or it won't work. It's also very important that the reference variable is set under the Parameters tab. That absolutely should be working fine to set the username on the user object. The fallback only applies if the username is empty.


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 to join the conversation.

2 years 3 months ago #328345 by 3by400Inc
Replied by 3by400Inc on topic Generate Usernames
We have the latest CB build but we cannot install the latest CB Auto Actions because the site has to use PHP 7.3 for the time being due to other extensions on the site. Would it still work with the following version of CB Auto Actions as long as we have the latest CB build?

CB Auto Actions :: 8.1.0+build.2021.09.17.15.43.10.d1f5f09a0

Please Log in to join the conversation.

2 years 3 months ago #328347 by krileon
Replied by krileon on topic Generate Usernames

Would it still work with the following version of CB Auto Actions as long as we have the latest CB build?

Yes, it should still work fine. It's CB that needs to be up to date. Ensure CB Auto Actions itself is public and published in CB > Plugin Management as the supplied usage should be working. Maybe also try the following code usage to add the username to the POST data.

$username = 'E'+ dechex( time() );

$variables['var1']->set( 'username', $username );

$_POST['username'] = $username;


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 to join the conversation.

2 years 3 months ago - 2 years 3 months ago #328349 by 3by400Inc
Replied by 3by400Inc on topic Generate Usernames
I was just reviewing all installed CB Joomla extensions and noticed something odd. Should our Admin Component still be 1.9.x ... and should we have two of them? Also, I think we're a few days behind on CB builds. See attached.

Attachments:

Please Log in to join the conversation.

2 years 3 months ago #328352 by 3by400Inc
Replied by 3by400Inc on topic Generate Usernames
I was reviewing some of our other sites and it looks like the CB Administrator Component should definitely NOT be version 1.9.1 nor should we have two of them!

What's the safest approach to resolve this? I assume I need to manually override the CB component files. Should that work without breaking anything?

Please Log in to join the conversation.

2 years 3 months ago #328354 by krileon
Replied by krileon on topic Generate Usernames
Ok, looks like there's some checks after that trigger that end up resetting the username. The below was the only way I was able to get this to work and have confirmed this works.

Global
Triggers: onBeforeUserRegistration
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
$variables['var1']->set( 'username', 'E' . dechex( time() ) );
Parameters
References: Variable 1


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: 3by400Inc

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.219 seconds