why not trigger this?

4 years 8 months ago #313417 by saman2
why not trigger this? was created by saman2
hi
why not work this line?
$_PLUGINS->trigger( 'onBeforeUserRegistration', array( &$user, &$user ) );
$_PLUGINS->trigger( 'onAfterUserRegistration', array( &$user, &$user, true ) );
how can debug this?
i use Fabrik for register and use CB api to register user and registration work correct but these events not trigger. how to solve that?

Please Log in to join the conversation.

4 years 8 months ago #313419 by krileon
Replied by krileon on topic why not trigger this?
You need to load CBs plugins into memory for them to act on any triggers fired. This is done using the below.

$_PLUGINS->loadPluginGroup( 'user' );


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.

4 years 8 months ago #313438 by saman2
Replied by saman2 on topic why not trigger this?
where we can find this syntax and maybe other similar problem? it is not in the document in this link:
www.joomlapolis.com/documentation/18362-registering-a-user-through-cb-api

Please Log in to join the conversation.

4 years 8 months ago #313449 by krileon
Replied by krileon on topic why not trigger this?
Loading plugins in specifically isn't documented. Custom coding isn't necessary anymore in most cases. You can register a user through CB Auto Actions for example so a simple HTTP call to the auto action can handle the entire process for you. Will add a note regarding plugin loading to the below triggers documentation.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18358-using-cb-triggers


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.

4 years 8 months ago #313456 by saman2
Replied by saman2 on topic why not trigger this?

krileon wrote: You can register a user through CB Auto Actions for example so a simple HTTP call to the auto action can handle the entire process for you

is there any document for this or can you say how can do this? what type of autoaction need to use?

Please Log in to join the conversation.

4 years 8 months ago #313460 by krileon
Replied by krileon on topic why not trigger this?

is there any document for this or can you say how can do this?

Create an auto action with Triggers left as None. This then allows the auto action to be executed directly. So you could do a HTML form post to the auto action, a redirect to it, a menu item to it, etc.. As for getting field data you can grab it from POST using [post_INPUT_NAME], GET using [get_INPUT_NAME], etc.. It's recommended to enable Format Functions under Parameters tab and use them to sanitize the data though (e.g. [cb:parse function="clean" method="string"][post_INPUT_NAME],[/cb:parse]).

what type of autoaction need to use?

Registration


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.

Moderators: beatnantkrileon
Time to create page: 0.686 seconds

Facebook Twitter LinkedIn