The query won't work if they have more than one secondary group.
Anyway, you need to identify WHERE the usergroup change is made, and add another line:
$DB_site->query("query here");
I dont quite understand what you mean about the Where.
I created the following cron, which seems to work
Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($DB_site))
{
exit;
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET displaygroupid = 12 WHERE membergroupids = 12 and displaygroupid = 0");
log_cron_action('Subscribing Member Display Group Updated', $nextitem);
?>