// -------------------------------------------------------------------------
// Send out an email only to admins who want to receive them for new signups
$query = "
SELECT up.USER_REAL_EMAIL, up.USER_NOTIFY_NEW_USER, up.USER_LANGUAGE, u.USER_DISPLAY_NAME
FROM {$config['TABLE_PREFIX']}USER_PROFILE up,
{$config['TABLE_PREFIX']}USERS u
WHERE u.USER_MEMBERSHIP_LEVEL = 'Administrator'
AND up.USER_ID = u.USER_ID
AND up.USER_NOTIFY_NEW_USER = '1'
";
$sth = $dbh -> do_query($query,__LINE__,__FILE__);
$mailer = new mailer();
while(list($adminemail,$notify_newuser,$lang,$username) = $dbh -> fetch_array($sth)) {
if (!$adminemail) continue;
$mailer->set_language($lang);
$mailer->set_subject('REGN_SUBJECT', array('BOARD_TITLE' => $config['COMMUNITY_TITLE']));
$mailer->set_salute('EMAIL_SALUTE', array('USERNAME' => $username));
$subs = array(
'EMAIL_ADDY' => $regemail,
'DISPLAY_NAME' => $newusername,
'IP_ADDY' => $regip);
$mailer->add_content('REGN_CONTENT', $subs);
// Tell them they need to moderate or just be informative
if ($config['NEW_USER_MODERATION']) {
$mailer->add_content('REGN_CONTENT1');
$mailer->add_content('REGN_CONTENT2',array('MANAGE_URL' => "{$config['FULL_URL']}/admin/membermanage.php?returntab=1"),true);
}
else {
$mailer->add_content('REGN_CONTENT3');
}
$mailer -> ubbt_mail($adminemail);
}