本文整理汇总了PHP中c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog方法的具体用法?PHP c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog怎么用?PHP c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c_ws_plugin__s2member_utils_users
的用法示例。
在下文中一共展示了c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paypal_form_submission_validation_errors
//.........这里部分代码省略.........
$response = array("response" => _x('Missing Postal/Zip Code. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if ($s["attr"]["captcha"] && (empty($s["recaptcha_challenge_field"]) || empty($s["recaptcha_response_field"]) || !c_ws_plugin__s2member_utils_captchas::recaptcha_code_validates($s["recaptcha_challenge_field"], $s["recaptcha_response_field"]))) {
$response = array("response" => _x('Missing or invalid Security Code. Please try again.', "s2member-front", "s2member"), "error" => true);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
} else {
if ($form === "registration") {
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && (empty($s["first_name"]) || !is_string($s["first_name"]))) {
$response = array("response" => _x('Missing First Name. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && (empty($s["last_name"]) || !is_string($s["last_name"]))) {
$response = array("response" => _x('Missing Last Name. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if (empty($s["email"]) || !is_string($s["email"])) {
$response = array("response" => _x('Missing or invalid Email Address. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if (!is_email($s["email"])) {
$response = array("response" => _x('Invalid Email Address. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if (email_exists($s["email"]) && (!is_multisite() || !c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog(@$s["username"], $s["email"]))) {
$response = array("response" => _x('That Email Address is already in use. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if (empty($s["username"]) || !is_string($s["username"]) || empty($s["_o_username"]) || !is_string($s["_o_username"])) {
$response = array("response" => _x('Missing or invalid Username. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if (!validate_username($s["username"]) || !validate_username($s["_o_username"])) {
$response = array("response" => _x('Invalid Username. Please try again. Use ONLY lowercase alphanumerics.', "s2member-front", "s2member"), "error" => true);
} else {
if (username_exists($s["username"]) && (!is_multisite() || !c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog($s["username"], $s["email"]))) {
$response = array("response" => _x('That Username is already in use. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if (is_multisite() && !c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog($s["username"], $s["email"]) && ($_response = wpmu_validate_user_signup($s["username"], $s["email"])) && is_wp_error($_errors = $_response["errors"]) && $_errors->get_error_message()) {
$response = array("response" => $_errors->get_error_message(), "error" => true);
} else {
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] && (empty($s["password1"]) || !is_string($s["password1"]))) {
$response = array("response" => _x('Missing Password. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] && strlen($s["password1"]) < 6) {
$response = array("response" => _x('Invalid Password. Must be at least 6 characters. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] && strlen($s["password1"]) > 20) {
$response = array("response" => _x('Invalid Password. Max length is 20 characters. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] && (empty($s["password2"]) || $s["password2"] !== $s["password1"])) {
$response = array("response" => _x('Password fields do NOT match. Please try again.', "s2member-front", "s2member"), "error" => true);
} else {
if ($custom_field_validation_errors = c_ws_plugin__s2member_custom_reg_fields::validation_errors(isset($s["custom_fields"]) ? $s["custom_fields"] : array(), c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level($s["attr"]["level"], "registration", TRUE))) {
$response = array("response" => array_shift($custom_field_validation_errors), "error" => true);
} else {
if ($s["attr"]["captcha"] && (empty($s["recaptcha_challenge_field"]) || empty($s["recaptcha_response_field"]) || !c_ws_plugin__s2member_utils_captchas::recaptcha_code_validates($s["recaptcha_challenge_field"], $s["recaptcha_response_field"]))) {
$response = array("response" => _x('Missing or invalid Security Code. Please try again.', "s2member-front", "s2member"), "error" => true);
}
示例2: stripe_form_submission_validation_errors
/**
* Validates different kinds of form submissions.
*
* Free Registration Forms do NOT require API Credentials.
*
* @package s2Member\Stripe
* @since 140617
*
* @param string $form The type of Pro-Form being submitted.
* @param array $s An array of data submitted through the Pro-Form.
*
* @return null|array Null if there are no errors, else a response array.
*/
public static function stripe_form_submission_validation_errors($form, $s = array())
{
$cp_attr = c_ws_plugin__s2member_pro_stripe_utilities::apply_coupon($s['attr'], $s['coupon'], 'attr');
$is_free_checkout = in_array($form, array('sp-checkout', 'checkout'), TRUE) && $cp_attr['ta'] <= 0 && $cp_attr['ra'] <= 0;
$is_bitcoin_checkout = !$is_free_checkout && in_array($form, array('sp-checkout', 'checkout'), TRUE) && stripos($s['source_token'], 'btcrcv_') === 0;
if ($form === 'registration' || !($response = c_ws_plugin__s2member_pro_stripe_responses::stripe_form_api_validation_errors())) {
if ($form === 'cancellation') {
if (!is_user_logged_in()) {
$response = array('response' => sprintf(_x('You must <a href="%s" rel="nofollow">log in</a> to cancel your account.', 's2member-front', 's2member'), esc_attr(wp_login_url($_SERVER['REQUEST_URI']))), 'error' => TRUE);
} else {
if ($s['attr']['captcha'] && (empty($s['recaptcha_challenge_field']) || empty($s['recaptcha_response_field']) || !c_ws_plugin__s2member_utils_captchas::recaptcha_code_validates($s['recaptcha_challenge_field'], $s['recaptcha_response_field']))) {
$response = array('response' => _x('Missing or invalid Security Verification. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (is_object($user = wp_get_current_user()) && $user->ID && $user->has_cap('administrator')) {
$response = array('response' => _x('Unable to process. You are an Administrator. Stopping here for security. Otherwise, an Administrator could lose access.', 's2member-admin', 's2member'), 'error' => TRUE);
}
}
}
} else {
if ($form === 'update') {
if (!is_user_logged_in()) {
$response = array('response' => sprintf(_x('You must <a href="%s" rel="nofollow">log in</a> to update your billing information.', 's2member-front', 's2member'), esc_attr(wp_login_url($_SERVER['REQUEST_URI']))), 'error' => TRUE);
} else {
if (is_object($user = wp_get_current_user()) && $user->ID && $user->has_cap('administrator')) {
$response = array('response' => _x('Unable to process. You are an Administrator. Stopping here for security. Otherwise, an Administrator could lose access.', 's2member-admin', 's2member'), 'error' => TRUE);
} else {
if (empty($s['source_token']) || !is_string($s['source_token'])) {
$response = array('response' => _x('Missing Billing Info. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if ($s['attr']['captcha'] && (empty($s['recaptcha_challenge_field']) || empty($s['recaptcha_response_field']) || !c_ws_plugin__s2member_utils_captchas::recaptcha_code_validates($s['recaptcha_challenge_field'], $s['recaptcha_response_field']))) {
$response = array('response' => _x('Missing or invalid Security Verification. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
}
}
}
}
} else {
if ($form === 'registration') {
/** @var $_errors \WP_Error For IDEs. This variable is used below in at least one place. */
if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_names'] && (empty($s['first_name']) || !is_string($s['first_name']))) {
$response = array('response' => _x('Missing First Name. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_names'] && (empty($s['last_name']) || !is_string($s['last_name']))) {
$response = array('response' => _x('Missing Last Name. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (empty($s['email']) || !is_string($s['email'])) {
$response = array('response' => _x('Missing or invalid Email Address. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (!is_email($s['email'])) {
$response = array('response' => _x('Invalid Email Address. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (email_exists($s['email']) && (!is_multisite() || !c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog(@$s['username'], $s['email']))) {
$response = array('response' => _x('That Email Address is already in use. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (empty($s['username']) || !is_string($s['username']) || empty($s['_o_username']) || !is_string($s['_o_username'])) {
$response = array('response' => _x('Missing or invalid Username. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (!validate_username($s['username']) || !validate_username($s['_o_username'])) {
$response = array('response' => _x('Invalid Username. Please try again. Use ONLY lowercase alphanumerics.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (username_exists($s['username']) && (!is_multisite() || !c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog($s['username'], $s['email']))) {
$response = array('response' => _x('That Username is already in use. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if (is_multisite() && !c_ws_plugin__s2member_utils_users::ms_user_login_email_can_join_blog($s['username'], $s['email']) && ($_response = wpmu_validate_user_signup($s['username'], $s['email'])) && is_wp_error($_errors = $_response['errors']) && $_errors->get_error_message()) {
$response = array('response' => $_errors->get_error_message(), 'error' => TRUE);
} else {
if ((empty($s['password1']) || !is_string($s['password1'])) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_password']) {
$response = array('response' => _x('Missing Password. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if ((empty($s['password1']) || strlen($s['password1']) < c_ws_plugin__s2member_user_securities::min_password_length()) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_password']) {
$response = array('response' => sprintf(_x('Invalid Password. Must be at least %1$s characters. Please try again.', 's2member-front', 's2member'), c_ws_plugin__s2member_user_securities::min_password_length()), 'error' => TRUE);
} else {
if (!empty($s['password1']) && strlen($s['password1']) > 64 && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_password']) {
$response = array('response' => _x('Invalid Password. Max length is 64 characters. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if ((empty($s['password2']) || $s['password2'] !== $s['password1']) && $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_password']) {
$response = array('response' => _x('Password fields do NOT match. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
} else {
if ($custom_field_validation_errors = c_ws_plugin__s2member_custom_reg_fields::validation_errors(isset($s['custom_fields']) ? $s['custom_fields'] : array(), c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level($s['attr']['level'], 'registration', TRUE))) {
$response = array('response' => array_shift($custom_field_validation_errors), 'error' => TRUE);
} else {
if ($s['attr']['captcha'] && (empty($s['recaptcha_challenge_field']) || empty($s['recaptcha_response_field']) || !c_ws_plugin__s2member_utils_captchas::recaptcha_code_validates($s['recaptcha_challenge_field'], $s['recaptcha_response_field']))) {
$response = array('response' => _x('Missing or invalid Security Verification. Please try again.', 's2member-front', 's2member'), 'error' => TRUE);
}
}
}
}
}
//.........这里部分代码省略.........