Skip to:
Content
Pages
Categories
Search
Top
Bottom

Do action bp_signup_username_errors fires what code


  • sayfrndship
    Participant

    @sayfrndship

    hi all,
    i m not new to developmnet but new to buddypress, i m tired to find out what code is running behind this
    do_action( ‘bp_signup_username_errors’ );
    under register.php

    i added google recaptcha v2 , validated somehow successfully in
    function bp_core_validate_user_signup( $user_name, $user_email )
    bg-member-functions.php

    next i found this
    // If there are errors with account details, set them for display.
    if ( !empty( $account_details[‘errors’]->errors[‘user_name’] ) )
    $bp->signup->errors[‘signup_username’] = $account_details[‘errors’]->errors[‘user_name’][0];

    what is I need is to show google captcha failure message where i want , as like it is showing for username or other fields.
    wordpress code is really hard to understand.

Viewing 1 replies (of 1 total)

  • sayfrndship
    Participant

    @sayfrndship

    some how i found that
    underneath this code

    if ( !empty( $account_details[‘errors’]->errors[‘user_name’] ) )
    $bp->signup->errors[‘signup_username’] = $account_details[‘errors’]->errors[‘user_name’][0];

    add_action( ‘bp_’ . $fieldname . ‘_errors’, create_function( ”, ‘echo apply_filters(\’bp_members_signup_error_message\’, “<div class=\”error\”>” . stripslashes( \” . addslashes( $error_message ) . ‘\’ ) . “</div>” );’ ) );

    it was showing error,
    wordpress really suchks. wp is just for kids not for professionals

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar