Exemplo n.º 1
0
function member_send_signup_email()
{
    global $t, $db, $vars;
    mail_signup_user($vars['member_id']);
    $t->assign('title', 'E-Mail sent');
    $t->assign('msg', 'Signup E-Mail has been sent');
    $t->assign('link', "users.php?member_id={$vars['member_id']}&action=actions");
    $t->assign('member_id', $member_id);
    $t->display("admin/user_saved.html");
}
Exemplo n.º 2
0
function check_for_signup_mail($payment_id, $member_id)
{
    ### fix me! Signup mail ####
    global $config, $db;
    if (!$payment_id && !$member_id) {
        return;
    }
    global $db;
    if (!$member_id) {
        $payment = $db->get_payment($payment_id);
        $member_id = $payment['member_id'];
    }
    $member = $db->get_user($member_id);
    if ($member['data']['signup_email_sent']) {
        return;
    }
    if (!$config['manually_approve'] || $member['data']['is_approved']) {
        $payments = $db->get_user_payments($member_id, 1);
        foreach ($payments as $p) {
            $exists_payments++;
        }
        // send mail only if it FIRST payment for this product
        if ($exists_payments && $config['send_signup_mail']) {
            mail_signup_user($member_id);
            $member['data']['signup_email_sent']++;
            $db->update_user($member_id, $member);
        }
    } else {
        if ($member['data']['approval_email_sent']) {
            return;
        }
        mail_approval_wait_user($member_id);
        mail_approval_wait_admin($member_id);
        $member['data']['approval_email_sent']++;
        $db->update_user($member_id, $member);
    }
}