Fabrik user registration + Community Builder

jo-ka

Member
I know that this is not for support CB, but I have a question.

As you might know, if you create a user out of Community Builder module than it's necessary to manually sync the users between J! and CB, using an option available in CB-> Tools -> Sync users

If you create the user via CB, then it's automatically created.

So, as I'm using Fabrik to create new users, the Juser form plugin is connected to J! users registration and so the users are not automatically synced with CB.

I've found in CB code that, the manual sync task is made with a CB function called syncUsers.

So, as I can understand that we can't connect Fabrik to CB users registration, my question is if there's a way to use PHP form plugin to run this function onAfterProcess when the record is saved.

Also I was thinking in copy the function to the code to PHP form plugin and after it, run it.

Or, if there's another way like a macro (I'm guessing here...)

Thank's in advance.
 
Dear Hugh, thanks for the update.
I really don't have any documentation, but I'm sending you the file where the function is defined... I don't know if it might help.

Thank's in advance.
 

Attachments

  • controller.default.php.zip
    15.4 KB · Views: 145
Really this is something which would be best handled by adding CB integration to the juser plugin. I'm just a little worried that the only API examples I can find are very old ...

https://www.joomlapolis.com/support/tutorials/120-api-usage/18362-registering-a-user-through-cb-api

... and I don't know if they apply to the most recent CB release.

Anyway, this isn't something we could do on subscription support, it would have to be custom work. Let me know if you want me to quote you for the work.

-- hugh
 
Dear Hugh,

Thanks for the update.

Can you please then check how much can it cost?



Enviado do meu K010 atrav?s de Tapatalk
 
Dear Hugh.

I've got today the confirmation that this documentation still apply to the current CB version. So, can you please send me some more info?
 
Also I was thinking in copy the function to the code to PHP form plugin and after it, run it.

I would do this. but, you dont need to copy whole function code, your object is to update DB field in the PHP form plugin on each user who register through your custom form.

Sunit
 
I would do this. but, you dont need to copy whole function code, your object is to update DB field in the PHP form plugin on each user who register through your custom form.

Sunit
Dear Sunit,

Can you please explain me better your approach to this question? Maybe with some example code?
Thanks in advance.
 
As I see, here, the syncing will not work while registering as the user has not been logged automatically after registration. What you have to do, is to update the CB users record also in registration form via php form plugin. Here I assume that you have used php form plugin and used SQL queries before within plugin, so you can insert the user records in CB user tables by getting the field details from the registration form itself by:

1- getting user name corresponding userid, email etc from form field (by get form data and use on after process in phpform plugin).
2- Insert record in database by running the insert query in php form plugin. Examples here:

Workable examples for CB sync via custom query:
Code:
http://forum.joomla.org/viewtopic.php?f=43&t=238510#p1561679

but change code for insert after joomla 1.7 +
Code:
https://docs.joomla.org/Inserting,_Updating_and_Removing_data_using_JDatabase#Using_SQL

and here:
Code:
http://fabrikar.com/forums/index.php?wiki/common-php-tasks/#insert

Better test on localhost before going live to save from site crash nightmares.

Sunit
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top