Refre email as actions
This commit is contained in:
@@ -2110,6 +2110,7 @@ long WrenchSendReferLoadLink(CVars in, CVars &out) {
|
||||
long WrenchSendRefer(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "long WrenchSendRefer(CVars in, CVars out)");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
CVars ml;
|
||||
try {
|
||||
//out = in;
|
||||
out["status"] = "";
|
||||
@@ -2164,7 +2165,14 @@ long WrenchSendRefer(CVars in, CVars &out) {
|
||||
const PGresult *res4 = pgsql_query("UPDATE members_refer_friend SET sent=now() WHERE id=%lu", refer_id);
|
||||
in["refer_id"] = refer_id;
|
||||
in["refer_id"].set_valid(true);
|
||||
account_email(ACCOUNT_SEND_REFEREMAIL, in, out); // ALERT REFER EMAIL
|
||||
|
||||
ml["action"] = ACCOUNT_SEND_REFEREMAIL; ml["action"].set_valid( true );
|
||||
ml["topic"] = "ACCOUNT_SEND_REFEREMAIL"; ml["topic"].set_valid( true );
|
||||
ml["refer_id"] = refer_id; ml["refer_id"].set_valid( true );
|
||||
//ml["interest_id"] = in["interest_id"]; ml["interest_id"].set_valid( true );
|
||||
submit_cron_email(ml);
|
||||
|
||||
// account_email(ACCOUNT_SEND_REFEREMAIL, in, out); // ALERT REFER EMAIL
|
||||
out["status"] = "Refer message sent";
|
||||
ret = PHP_API_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user