• Resolved qwik3r

    (@qwik3r)


    I assumed that when logging into site A it would create a user on site B if they didn’t exist. This seems to be the case for another user on my site, but while testing my own non admin account it didn’t work. I logged in as a regular user on site A and it did not create a user on site B for myself. I know it’s generally working because a Woocommerce order came in which created a user and that synced to the second site. I’m curious as to why my own attempts at testing wouldn’t permit the creation of the user on site B?

    The logs are a bit confusing but here is site a (note: I put XXXX to obscure the actual site/user info)

    2022-11-08 16:44:51 - Info - Login action - enqueueing asynchronous actions for username "[email protected]"
    2022-11-08 16:44:56 - Info - Renewing token for https://site.com/
    2022-11-08 16:44:56 - Info - Added https://site.com/wprus/login/?wprusdata=zIqh87W5fWUpjYkiMwOun9KLHYxJXQ7UjvRYJA7UN%2BLQtH4Cfkt1sttQ5cKgj3PWx1JpSzvAfHQMdtQyDtI7j56X4KJif4H39DjcdNpKpilu%2BOXJmcITv%2BNZrTxtz0bwl9_S4UI%2BP734h40ieLxw5GqmpP0MhGspC4u4hA59Igg8nEgcmrQN2lWvd2ablG61jNtmT6O2zMHfpMjoGHzbEg%3D%3D&token=2d386f04e17dcf2258acce83883838 async URL in wp_footer

    Site b:

    
    
    022-11-08 16:44:56 - Info - Token created: site https://siteB.com/ - action "Login"
    2022-11-08 16:45:00 - Success - Access granted - https://siteA.com
    2022-11-08 16:45:00 - Alert - Login action failed - received invalid data.
    		Array
    (
        [data] => Array
            (
                [username] => [email protected]
                [remember] => 0
                [base_url] => https://siteA.com
            )
    
    )
    
    • This topic was modified 2 years ago by qwik3r.
    • This topic was modified 2 years ago by qwik3r.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter qwik3r

    (@qwik3r)

    Fantastic support for this plugin…

    Plugin Author Alexandre Froger

    (@frogerme)

    Support may only be good as the user’s due diligence and feedback, I suppose…

    What if the user to synchronise does not exist on the remote site?

    If the incoming Create action is enabled along with the incoming Update action, the user will be synchronised on the remote website upon user update.
    If other actions for this user are fired before that (Login, Logout, Delete, Password, Metadata), nothing will happen, and an action failure log entry will be recorded if the “Enable Logs” box is checked.

    From the FAQ.

    Thread Starter qwik3r

    (@qwik3r)

    I read the FAQ then came here… but thanks for the sarcasm, it definitely helps in solving this.

    If other actions for this user are fired before that (Login, Logout, Delete, Password, Metadata

    How would “other actions” occur. Doesn’t that contradict itself if the user is trying to login, and it syncs with the remote site to add them to that site, the act of logging in ‘interrupts’ the creation and causes it to fail?

    Plugin Author Alexandre Froger

    (@frogerme)

    Merely matching the tone of the thread.

    It does not contradict itself. If a user profile is updated on Site A, with the set of actions indicated in the same paragraph of the FAQ properly configured, then the user is created on site B if it does not exist.

    User logs in on site A > Login action fails on site B > profile is updated somehow on site A (in the instance of WooCommerce you described it happened at order time) > user gets created on Site B

    A user cannot be simply created at Login, because the payload for Login and Logout sent to Site B cannot and will not include the entirety of the user account data.

    Plugin Author Alexandre Froger

    (@frogerme)

    As a side note: this behavior can be customised by developers with a combination of overloading the API classes and using the WordPress action and filter hooks provided by the plugin.

    Thread Starter qwik3r

    (@qwik3r)

    Thanks for the clarification. In the event something modifies the data ahead of being sent over to site B is there anyway to mitigate this? Such as setting a 30 second delay giving site A enough time to finish updating the user’s info (such as meta, tags from WP Fusion, Woocommerce related info etc) ?

    Would a second attempt to login then more or less fix the first attempt since in theory there might not be anything being updated anymore?

    Thread Starter qwik3r

    (@qwik3r)

    On another note, my apologies for the tone.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘User not syncing’ is closed to new replies.