New joomla users

4 months 3 days ago - 4 months 3 days ago #329607 by activha
Replied by activha on topic New joomla users
There is a : instead of ; in the second line ;-)

But after correction I get the info
Call to a member function trigger() on null

However it seems to work, users have been synced to CB.

What's strange it that the user is activated but I don't get the usual messages from CB with credentials. Maybe I should add another trigger than on AfterUserRegistration ?

For now the new user only receives a link asking to confirm his email address, and then nothing more even once he has confirmed on the link.

Is there possible to add it to a free CBsubs plan in the trigger to use all the plans trigger ? and how ?

Please Log in to join the conversation.

4 months 9 hours ago - 4 months 9 hours ago #329614 by krileon
Replied by krileon on topic New joomla users
It's not going to behave like a normal CB registration. It's completely bypassing all normal CB registration behaviors and just trying to synchronize. You can add whatever extra behavior you want; the entire code is all there. For example you can add a new trigger if you want exclusively for this and act on it to give them a subscription.

If you need the user to be in a true pending state then you'd need to set the below on their user object, but am unsure if this would negatively impact how they use that other extension.

$newUser->set( 'approved', 1 );
$newUser->set( 'confirmed', 0 );
$newUser->set( 'block', 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.

Please Log in to join the conversation.

3 months 4 weeks ago #329626 by activha
Replied by activha on topic New joomla users
OK I see

Do you mean adding a new autoaction of type : action ?
With mode :trigger and by selecting other autoactions ?

If I do this, will the other autoactions be executed in the order of their selection ?

For instance I use the first one to sync and the second one to attribute a subscription ?

Thanks for hints, I never used this feature

Please Log in to join the conversation.

3 months 4 weeks ago #329627 by krileon
Replied by krileon on topic New joomla users

For instance I use the first one to sync and the second one to attribute a subscription ?

Yes. So for example at the bottom add a new custom trigger to act on so you're only giving a subscription for this specific behavior.

$newUser	=	new \CB\Database\Table\UserTable();

$newUser->load( (int) '[var1_id]' );

if ( ! $newUser->getInt( 'id', 0 ) ) {
	return;
}

$newUser->set( 'approved', 1 );
$newUser->set( 'confirmed', 0 );
$newUser->set( 'block', 1 );

if ( ! $newUser->store() ) {
	return;
}

activateUser( $newUser, 1, 'UserRegistration' );

$_PLUGINS->trigger( 'onAfterUserRegistration', [ &$newUser, &$newUser, true ] );

$_PLUGINS->trigger( 'onAfterSyncRSTicketPro', [ &$newUser ] );

Now you'd use onAfterSyncRSTicketPro in your second auto action to give them a subscription.


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: activha

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.195 seconds