Help....
I am, of course, trying to accomplish something cockeyed and failing at it.
I have 50 sites, each using a separate database (all on same server). They share the Joomla users for a single log in on all sites. I cannot use the same CB data as we want each user to be able to set up a unique profile for each site.
Now the problem, syncing all of these users with CB across all fifty sites.. I am certain there is a way to do this via CB auto actions (upon verification) but nothing seems to work. I tried writing it as a cron job but to no avail.
Code:
<?php
$server = 'localhost';
$username = 'dbusername_dbname';
$password = 'password';
$database = 'db_name';
$connection = mysql_connect($server,$username,$password);
if (!$connection)
{
die( mysql_error() );
}
$db_selection = mysql_select_db($database, $connection);
if (!$db_selection)
{
die( mysql_error() );
}
$alltables = mysql_query("SHOW TABLES") or die ( mysql_error() );
while ( $table = mysql_fetch_array($alltables) )
{
mysql_query("INSERT IGNORE INTO prefix_comprofiler(id,user_id) SELECT id,id FROM prefix_users") or die( mysql_error() );
}
mysql_close($connection);
?>
I use CBautoaction = code conditions = (empty) method = php
I then loop it to each of the databases.. This used to work on syncing someone in CB using joomla 1.5 way back when but now?? Nothing.. Can someone please tell me where I am going wrong?