Esempio n. 1
0
function emailUser($option,$uid) {
	global $_CB_framework, $_CB_database, $ueConfig;
	if (($_CB_framework->myId() == 0) || ($ueConfig['allow_email_display']!=1 && $ueConfig['allow_email_display']!=3)) {
		cbNotAuth();
		return;
	}

	$spamCheck = cbSpamProtect( $_CB_framework->myId(), false );
	if ( $spamCheck ) {
		echo $spamCheck;
		return;
	}
	$rowFrom = new moscomprofilerUser( $_CB_database );
	$rowFrom->load( $_CB_framework->myId() );

	$rowTo = new moscomprofilerUser( $_CB_database );
	$rowTo->load( (int) $uid );
	HTML_comprofiler::emailUser($option,$rowFrom,$rowTo);
}
Esempio n. 2
0
function emailUser($option, $uid)
{
    global $_CB_framework, $_PLUGINS, $ueConfig;
    $allowPublic = isset($ueConfig['allow_email_public']) ? (int) $ueConfig['allow_email_public'] : 0;
    if ($_CB_framework->myId() == 0 && !$allowPublic || $ueConfig['allow_email_display'] != 1 && $ueConfig['allow_email_display'] != 3 || !CBuser::getMyInstance()->authoriseView('profile', $uid)) {
        cbNotAuth(true);
        return;
    }
    $spamCheck = cbSpamProtect((int) $_CB_framework->myId(), false, $allowPublic);
    if ($spamCheck) {
        $_CB_framework->enqueueMessage($spamCheck, 'error');
        return;
    }
    $_PLUGINS->loadPluginGroup('user');
    $rowFrom = new UserTable();
    $rowFrom->load((int) $_CB_framework->myId());
    $rowTo = new UserTable();
    $rowTo->load((int) $uid);
    HTML_comprofiler::emailUser($option, $rowFrom, $rowTo, $allowPublic);
}