Share Frontend Users Between Multiple Sites
« on: 08 Apr 2008, 13:08 »
--------------------------------------------------------------------------------
If you want to share frontend users among multiple sites, redirect the registration to the main site (originating). Then set up the following crontab job for each site:
Minute: 1,16,31,46
Hour: *
Day of Month: *
Month : *
Day of Week: *
Command:
/usr/bin/mysqldump -h<originating-hostname> -u<originating-username> -p<originating-password> --quick --add-drop-table --add-locks --lock-tables --tables <originating database name> cms_module_feusers_belongs cms_module_feusers_dropdowns cms_module_feusers_grouppropmap cms_module_feusers_groups cms_module_feusers_groups_seq cms_module_feusers_propdefn cms_module_feusers_properties cms_module_feusers_properties_seq cms_module_feusers_tempcode cms_module_feusers_users cms_module_feusers_users_seq | MySQL -h<destination-hostname> -u<destination-username> -p<destination-password> <destination database name>
This example will run the job every 15 minutes and synch the feusers tables between 2 sites.
Notes:
- This will work between different servers.
- You may need to change the path to mysqldump, depending on your setup.
- Replace the entries in < > with your specific database info.
- Replace the "cms_" table prefixes with your table prefixes.
- The command must be a single line.
Nullig