Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

  • dinesh.ravajani07
    Participant

    @dineshravajani07

    Ya it works very well.

    Thank you so much.

    But now 1 question arise is that right now i had changed my code manually in bp-core-functions.php file but when i will update my buddypress plugin ,i think that my changes will be erased.

    so is that any hook or actions are available so that i can use that hook in my theme functions.php file.

    Many Thanks so far.


    dinesh.ravajani07
    Participant

    @dineshravajani07

    When i placed your code “var_dump( $matched_url, $home_url );”
    Above the // Nonce check failed line then it gives me below output

    string(59) “http://180.211.110.195:8082:8082/greenbc-new/registrierung/”
    string(39) “http://180.211.110.195:8082/greenbc-new”

    Actually the problem which i am facing with my project is that on Registration Page, if i directly submit the form then it is not displaying any validation error, it is because the
    bp_verify_nonce_request() returns me the false value.


    dinesh.ravajani07
    Participant

    @dineshravajani07

    So this is how my code looks like.

    // Check the nonce
    $result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;

    var_dump( $result, $action, strpos( $matched_url, $home_url ) !== 0 );

    // Nonce check failed
    if ( empty( $result ) || empty( $action ) || ( strpos( $matched_url, $home_url ) !== 0 ) ) {
    $result = false;
    }

    var_dump( $result, $action, strpos( $matched_url, $home_url ) !== 0 );

    ===============================================
    I had placed var_dump() before IF condition and also after IF Condition.

    It returns me like that

    int(1) string(13) “bp_new_signup” bool(true)

    bool(false) string(13) “bp_new_signup” bool(true)


    dinesh.ravajani07
    Participant

    @dineshravajani07

    Hi,

    When i placed var_dump( $result, $action, strpos( $matched_url, $home_url ) !== 0 );

    It gives me the following output

    int(1) string(13) “bp_new_signup” bool(true)


    dinesh.ravajani07
    Participant

    @dineshravajani07

    Ya on my live server it returns me “False” value, but on my localhost it returns “True” and works very well.

    I am worried about this issue.

    Can anyone please help me regarding this issue.


    dinesh.ravajani07
    Participant

    @dineshravajani07

    Hello All,

    I am also facing the same problem with bp_verify_nonce_request() function.

    It proper works on my Localhost but on my live server its not working properly

    In File : bp-members-screen.php file
    } elseif ( isset( $_POST[‘signup_submit’] ) && bp_verify_nonce_request( ‘bp_new_signup’ ) ) {

    this will not work.. but if i will replace the above code with the below code then it will work

    Below code will work properly
    } elseif ( isset( $_POST[‘signup_submit’] ) || bp_verify_nonce_request( ‘bp_new_signup’ ) ) {

    I know that if i will make changes in Buddypress core files then after update my changes will be lost.

    Is any Hook are available so that i can use in my functions.php file.
    Please help me someone. Its urgent and i want to complete my project as soon as possible.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
Skip to toolbar