1. Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.
    Dismiss Notice

Fabrik user registration + Community Builder

Discussion in 'Standard Support' started by jo-ka, Feb 18, 2016.

  1. jo-ka

    jo-ka Member

    Level: Standard
    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.
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    If you can dig up some documentation on syncUsers I'll take a look.

    -- hugh
     
  3. jo-ka

    jo-ka Member

    Level: Standard
    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.
     

    Attached Files:

  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Yeah, that's not really a callable API, looks like it's part of an admin controller.

    -- hugh
     
  5. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    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
     
  6. jo-ka

    jo-ka Member

    Level: Standard
    Dear Hugh,

    Thanks for the update.

    Can you please then check how much can it cost?



    Enviado do meu K010 atrav?s de Tapatalk
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
  8. jo-ka

    jo-ka Member

    Level: Standard
  9. jo-ka

    jo-ka Member

    Level: Standard
    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?
     
  10. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I'll take a look and contact you with a quote in the next few days.

    Sent from my Nexus 7 using Tapatalk
     
  11. automill

    automill Member

    Level: Community
    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
     
  12. jo-ka

    jo-ka Member

    Level: Standard
    Dear cheesegrits, do you had a time to check this issue? Thanks in advance.
     
  13. jo-ka

    jo-ka Member

    Level: Standard
    Dear Sunit,

    Can you please explain me better your approach to this question? Maybe with some example code?
    Thanks in advance.
     
  14. automill

    automill Member

    Level: Community
    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 (Text):
    http://forum.joomla.org/viewtopic.php?f=43&t=238510#p1561679
    but change code for insert after joomla 1.7 +
    Code (Text):
    https://docs.joomla.org/Inserting,_Updating_and_Removing_data_using_JDatabase#Using_SQL
    and here:
    Code (Text):
    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
     

Share This Page