當前位置: 首頁>>代碼示例>>PHP>>正文


PHP set_bounce_count函數代碼示例

本文整理匯總了PHP中set_bounce_count函數的典型用法代碼示例。如果您正苦於以下問題:PHP set_bounce_count函數的具體用法?PHP set_bounce_count怎麽用?PHP set_bounce_count使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了set_bounce_count函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: useredit_update_bounces

function useredit_update_bounces($user, $usernew) {
    if (!isset($usernew->email)) {
        //locked field
        return;
    }
    if (!isset($user->email) || $user->email !== $usernew->email) {
        set_bounce_count($usernew,true);
        set_send_count($usernew,true);
    }
}
開發者ID:nigeldaley,項目名稱:moodle,代碼行數:10,代碼來源:editlib.php

示例2: moodle_process_email

/**
 * ?
 *
 * @todo Finish documenting this function
 *
 * @param string $modargs
 * @param string $body Currently unused
 */
function moodle_process_email($modargs, $body)
{
    global $DB;
    // The first char should be an unencoded letter. We'll take this as an action.
    switch ($modargs[0]) {
        case 'B':
            // Bounce.
            list(, $userid) = unpack('V', base64_decode(substr($modargs, 1, 8)));
            if ($user = $DB->get_record("user", array('id' => $userid), "id,email")) {
                // Check the half md5 of their email.
                $md5check = substr(md5($user->email), 0, 16);
                if ($md5check == substr($modargs, -16)) {
                    set_bounce_count($user);
                }
                // Else maybe they've already changed it?
            }
            break;
            // Maybe more later?
    }
}
開發者ID:lucaboesch,項目名稱:moodle,代碼行數:28,代碼來源:moodlelib.php

示例3: moodle_process_email

function moodle_process_email($modargs, $body)
{
    // the first char should be an unencoded letter. We'll take this as an action
    switch ($modargs[0]) {
        case 'B':
            // bounce
            list(, $userid) = unpack('V', base64_decode(substr($modargs, 1, 8)));
            if ($user = get_record_select("user", "id={$userid}", "id,email")) {
                // check the half md5 of their email
                $md5check = substr(md5($user->email), 0, 16);
                if ($md5check == substr($modargs, -16)) {
                    set_bounce_count($user);
                }
                // else maybe they've already changed it?
            }
            break;
            // maybe more later?
    }
}
開發者ID:nadavkav,項目名稱:rtlMoodle,代碼行數:19,代碼來源:moodlelib.php


注:本文中的set_bounce_count函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。