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


PHP validate_user_form函數代碼示例

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


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

示例1: validate_user_signup

/**
 * Validate the new user signup
 *
 * @since MU
 *
 * @return bool True if new user signup was validated, false if error
 */
function validate_user_signup()
{
    $result = validate_user_form();
    $user_name = $result['user_name'];
    $user_email = $result['user_email'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        signup_user($user_name, $user_email, $errors);
        return false;
    }
    if ('blog' == $_POST['signup_for']) {
        signup_blog($user_name, $user_email);
        return false;
    }
    /** This filter is documented in wp-signup.php */
    wpmu_signup_user($user_name, $user_email, apply_filters('add_signup_meta', array()));
    confirm_user_signup($user_name, $user_email);
    return true;
}
開發者ID:aaronholbrook,項目名稱:ms-custom-signup,代碼行數:26,代碼來源:new-user.php

示例2: validate_user_signup

/**
 * Validate the new user signup
 *
 * @since MU
 *
 * @uses validate_user_form() to retrieve an array of the user data
 * @uses wpmu_signup_user() to signup the new user
 * @uses confirm_user_signup() to confirm the new user signup
 * @return bool True if new user signup was validated, false if error
 */
function validate_user_signup()
{
    $result = validate_user_form();
    extract($result);
    if ($errors->get_error_code()) {
        signup_user($user_name, $user_email, $errors);
        return false;
    }
    if ('blog' == $_POST['signup_for']) {
        signup_blog($user_name, $user_email);
        return false;
    }
    //duplicate_hook
    wpmu_signup_user($user_name, $user_email, apply_filters('add_signup_meta', array()));
    confirm_user_signup($user_name, $user_email);
    return true;
}
開發者ID:openify,項目名稱:wordpress-composer,代碼行數:27,代碼來源:wp-signup.php

示例3: validate_user_signup

function validate_user_signup()
{
    $result = validate_user_form();
    extract($result);
    // list_hooked_functions();
    if ($errors->get_error_code()) {
        signup_user($user_name, $user_email, $errors);
        return false;
    }
    if ('blog' == $_POST['signup_for']) {
        signup_blog($user_name, $user_email);
        return false;
    }
    echo "<h1>" . $user_email . "</h1>";
    wpmu_signup_user($user_name, $user_email, apply_filters("add_signup_meta", array()));
    confirm_user_signup($user_name, $user_email);
    return true;
}
開發者ID:elizabethcb,項目名稱:Daily-Globe,代碼行數:18,代碼來源:wp-signup.php


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