Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning 0 when calling determine_current_user() #257

Open
marioshtika opened this issue Oct 19, 2022 · 5 comments
Open

Returning 0 when calling determine_current_user() #257

marioshtika opened this issue Oct 19, 2022 · 5 comments

Comments

@marioshtika
Copy link
Contributor

Hello @Tmeister,

I am having a problem when using your plugin with the BuddyPress plugin.
Specifically with the Messages endpoint.
I am getting the below error:

{
    "code": "bp_rest_authorization_required",
    "message": "Sorry, you cannot view the messages.",
    "data": {
        "status": 403
    }
}

This error message means that the user does not exist.

I followed the logic and I found out that the determine_current_user() is returning the user even though it shouldn't.

So I created a pull request #256 and tried to fix the if condition to return the user only if it's a REST request and the user exists.

I tested my PR and it is working fine.

Let me know if you need me to do any more tests or anything at all.

Thank you in advance

@marioshtika
Copy link
Contributor Author

Hello @Tmeister,

any update on this?

@marioshtika
Copy link
Contributor Author

Hello @Tmeister

did you have time to review my pull request #256.

I know a lot of users that are having the same problem.

Thank you in advance

@marioshtika
Copy link
Contributor Author

Hello @Tmeister,

any update on this issue?

Thank you in advance.

@marioshtika
Copy link
Contributor Author

Also, this is not related only to the BuddyPress plugin anymore, it is also happening on the default post API.

@marioshtika
Copy link
Contributor Author

@Tmeister any update on this, this is happening more and more often, on different websites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant