Plugin synchronize user records between 2 or more Osclass separate installations. If you have more classified websites, i.e. one for Cars classifieds, another one for Real Estate marketplace etc., it is great benefit, if user register on one site, account is created also on another sites.
Synchronize user data across different Osclass installations
Power of this plugin is in it's ability to not just create user accounts on another osclass installations, but it will also keep them synchronized all the time when user accounts are updated.
There are 2 basic functionalities:
- Feeding user records
- Streaming user records
Feeding is made manually by admin to do initial synchronization of user records. Streaming is automatically executed by CRON and user update/removal actions are automatically processed to all other osclass installations.
Feeding user records
When account is defined, and this account is “master” one, you probably want to feed (download) data from this osclass installation into your current. This action is not automatic, to avoid unwanted data rewriting.
To do feed, you go to Accounts section and click on “Feed now” button. Now your site will call website defined in account (URL) and will try to get first portion/batch of user records. It will start from very first user ID and maximum number of records transmitted is defined in that installation as “Feed limit” parameter.
If source installation has just few user records, feed will be completed in 1 round. If there is much more records, you will repeat this action multiple times.
Current status of feed/synchronization is written in “Message” of account and can look like: Progress: 23.81% (Total stats - Retrieved: 5, Remaining: 16, Total: 21 / Last request stats - Retrieved : 5, Limit: 5, From user ID: 0)
It includes overall progress as well as statics of last call. If you want to restart feed, go to account settings and set “Last User ID” to 0.
Streaming user records
When all Osclass installations are synchronized, feeding should not be required anymore. When user record is created or updated let’s say on Domain A, and this domain has defined 3 accounts: Domain B, C, D; then update/insert of user record on Domain A will be streamed automatically using CRON to Domains B, C, D. These domains must have Domain A defined in Accounts section to pass authentication based on API key.
Streaming is executed on following actions:
- New user registration
- User updated record
- User has been activated
- User has been deactivated
- User has been blocked
- User has been unblocked
- User has been removed
Streaming process is not directly connected to this action, because it could have negative impact on end user, therefore user ID/Email that should be streamed is stored into variable.
Content of this variable (users updated for stream, users removed for stream) is read by functions executed by CRON and streamed to target accounts. For this reason, in order to provide fast and up-to-date synchronization, you should create CRON command in your CRON tab of hosting that will execute following link at least once per 5 minutes, ideally every minute: {YOURSITE.COM}/oc-content/plugins/account_sync/cron.php
Streaming is automatically performed to all accounts defined in Accounts tab.
Accounts
Accounts are target/source websites/domains, from where you will feed user data or/and to those you will stream user data from your website.
Account URL must refer to base URL of Osclass installation that has Account Synchronizer Plugin installed & configured as well (and has also 1 account created for this/your website).
It means, if you want to stream & feed user records between Domain A and Domain B, Account Synchronizer Plugin must be installed at both domains, where:
- In Domain A, account for Domain B is defined with proper API key (B-api key)
- In Domain B, account for Domain A is defined with proper API key (A-api key)
Logs
Logs are created in almost every action when some data are transmitted or processed.
There are 3 types of logs:
- PROCESS – created when data (usually from feed action) are processed and stored in your installation
- FEED – data from other accounts are transmitted to your domain
- STREAM – data from your domain are streamed/transmitted to other domains defined in Accounts section
Log contains different information about executed action and are helpful in case of problem debugging.
This plugin contains detail documentation: Download documentation
Note: Plugin contains documentation that describe all plugin features in detail.