Skip to:
Content
Pages
Categories
Search
Top
Bottom

compatibility issue with oauth plugin

  • @theosloot

    Participant

    Hi,

    I’m using buddypress to make a page where people can upload their info and their CV in order to have a database with all these info. In addtion, that info has to be downloaded to an external APP, and I’m using oauth to protect the connection, and make the endpoint not available for everyone.

    The problem is that I need to activate both plugins (oauth server and buddypress) but when I try to get to the endpoint buddypress redirects me to the main page on my buddypress (mysite.es/users).

    The secuence is as follows: I’ve made a php script in which I use my client_id an secret_id to login to my site. Once I’m logged, I call the endpoint with a file_get_content. The problem is that due to the buddypress plugin, the call to the endpoint fails, and I got redirected to mysite.es/users instead to localhost/my_phpscript.php.

    In conclusion, Oauth wants to redirect me to a site, and buddypress to another: the default page.

    Thanks you all.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @henrywright

    Moderator

    Try finding the BuddyPress redirect and check if it’s removable. remove_action() might be handy in this situation, depending on how the redirect is coded.

    Ref: https://codex.wordpress.org/Function_Reference/remove_action

    @theosloot

    Participant

    Hi,

    do you mean remove something into de plugin code? If the plugin updates the changes will disapear.

    Could you be more specific?

    Thank you.

    @henrywright

    Moderator

    do you mean remove something into de plugin code?

    No.

    remove_action() is a function that lets you remove an action hook. Try reading up on WordPress actions; they’re a way to modify behaviour without editing core files.

    @theosloot

    Participant

    It is what I thought.

    So I have to look for the snippet in the code where the redirection is called, and disable it with remove_action(), isn’t it?

    The way to use the hook is creating a plugin and then remove_action(“hook_name”, function), being function the disable (like add_action when a plugin is made).

    And does anybody know where the hook is or if there is an easy way to find it? I’m a little bit confused and I think i’m missing terms.

    Thanks you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘compatibility issue with oauth plugin’ is closed to new replies.
Skip to toolbar