[SOLVED] Joomla onAfterUserRegistration

4 years 4 months ago - 4 years 3 months ago #315440 by activha
Hello

I would like to apply an auto action rule that we have set with the trigger onAfterUserRegistration when a user signs up with the standard joomla registration procedure.

We need this because we use the sign up feature from HikaShop which is only linked to joomla registration and not CB registration

Can you tell me what is the equivalent of this trigger for joomla , is it joomla_onAfterUserRegistration or joomla_onAfterUserSave

Thanks in advance

Please Log in to join the conversation.

4 years 4 months ago #315441 by krileon
Replied by krileon on topic Joomla onAfterUserRegistration
Joomlas event for that is onUserAfterSave so for CB Auto Actions to act on it you'd supply joomla_onUserAfterSave. Below is Joomlas phpdoc regarding that event so you know what variables are available.

/**
 * Utility method to act on a user after it has been saved.
 *
 * This method sends a registration email to new users created in the backend.
 *
 * @param   array    $user     Holds the new user data.
 * @param   boolean  $isnew    True if a new user is stored.
 * @param   boolean  $success  True if user was successfully stored in the database.
 * @param   string   $msg      Message.
 *
 * @return  void
 *
 * @since   1.6
 */
public function onUserAfterSave($user, $isnew, $success, $msg)

So for example to test if it's a new registration just condition that [var2] is equal to 1. Note CB will fire that trigger too when a user is created/saved in CB since we run Joomlas user store process first before ours.


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 4 months ago #315452 by activha
Replied by activha on topic Joomla onAfterUserRegistration
Note CB will fire that trigger too when a user is created/saved in CB since we run Joomlas user store process first before ours.

You mean that I simply need to replace onAfterUserRegistration by joomla_onAfterUserSave and check that [var2] is equal to 1 to get the same behavior as before ? but with joomla registration activated ?

That would solve all my problems when a new user buys something with HikaShop

Please Log in to join the conversation.

4 years 4 months ago #315455 by krileon
Replied by krileon on topic Joomla onAfterUserRegistration

You mean that I simply need to replace onAfterUserRegistration by joomla_onAfterUserSave and check that [var2] is equal to 1 to get the same behavior as before ? but with joomla registration activated ?

As long as you're not depending on CB field values in your auto action, yes.


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 4 months ago #315491 by activha
Replied by activha on topic Joomla onAfterUserRegistration
To continue on this subject I'd like to have your idea about Hikashop and users which needs to register in order to checkout.
For now it seems that Hikashop handles itself the registration process through Joomla registration process. I don't see any integration to replace this by CB registration process.
Do you have an idea to do so ? what would be the code to insert in order to show CB registration page in hikashop php ?
Is it ok in this case to leave joomla registration for new users together with CB registration ? if we handle auto action or other stuff with joomla native triggers what would be the disadvantages ?
Thanks for your ideas

Please Log in to join the conversation.

4 years 3 months ago #315500 by krileon
Replied by krileon on topic Joomla onAfterUserRegistration
Best I can suggest is if possible turn of Hikashops registration and just require users to register through CB first. It is not ok for your user tables to go out of sync. Your users need to be registered through CB or they won't exist in CB.


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.238 seconds

Facebook Twitter LinkedIn