Skip to:
Content
Pages
Categories
Search
Top
Bottom

Php plugin error – login

Viewing 6 replies - 1 through 6 (of 6 total)
  • Profile photo of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    You have a syntax err in the code somewhere. We can’t help you without seeing the code. Paste the function here.

    Profile photo of Jfcarter
    jfcarter
    Participant

    @jfcarter

    Okay, here’s the code. I cut and pasted it from the forum and added the php open and close :

    <?php

    function oci_login_redirect($redirect_to, $set_for, $user){

    $redirect_to = bp_core_get_userurl($user->ID);

    return $redirect_to;

    }

    add_filter(‘login_redirect’, ‘oci_login_redirect’, 10, 3);

    ?>

    Profile photo of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    The code you pasted has seven lines. But the error message mentions issues on line 9 and 10.

    Remove all the spaces after the closing “?>” tag. Save the file. Retry.

    Spaces after the terminal closing tag cause a lot of problems.

    Profile photo of Jfcarter
    jfcarter
    Participant

    @jfcarter

    Thanks again, Jeff! When I went into the file, there were extra spaces and a few slashes that I didn’t put in there (they may have come from my cut and paste).

    Anyway, it works perfectly now.

    :)))))

    Profile photo of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Great!

    Profile photo of Jfcarter
    jfcarter
    Participant

    @jfcarter

    And thanks to Burtadsit for the code/plugin idea. It’s a great one!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Php plugin error – login’ is closed to new replies.
Skip to toolbar