Directory

Use the right user ID to accept/reject group invites by imath · Pull Request #285 · buddypress/buddypress · GitHub
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

Use the right user ID to accept/reject group invites #285

Closed
wants to merge 1 commit into from

Conversation

imath
Copy link
Member

@imath imath commented May 5, 2024

Unless an Administrator is viewing another member's group invitations screen, the right user ID to use is the logged in user ID.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9135


This Pull Request is for code review only. Please keep all other discussion in the BuddyPress Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the WordPress Core Handbook for more details.

Unless an Administrator is viewing another member's group invitations screen, the right user ID to use is the logged in user ID.
@dcavins
Copy link
Contributor

dcavins commented May 10, 2024

Your fix looks good to me! I agree that it should nearly always be the logged-in user's ID, with the very unusual exception that an admin is helping another user accept an invite, which you've covered.

@imath imath deleted the patch/9135 branch May 11, 2024 10:20
dcavins pushed a commit to dcavins/buddypress-wp-svn that referenced this pull request Jun 2, 2024
The displayed user ID should only be used when an administrator is viewing a user profile. In all other contexts, the logged in user ID needs to be used. This change is fixing the issue when accepting such an invite from the groups directory.

Props kainelabsteam, dcavins

Fixes #9135
Closes buddypress/buddypress#285



git-svn-id: http://buddypress.svn.wordpress.org/trunk@13862 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants