Conversation
imath
left a comment
There was a problem hiding this comment.
Thanks a lot for this PR. I agree it's visually fixing the issue. But if an Admin clicks on the button to accept the invite for the user then:
- we have an Ajax error in Nouveau and the invite is not accepted.
- we have a regular error in Legacy but the invite is accepted.
So changing this behavior needs more changes probably:
- there https://github.com/buddypress/buddypress/blob/master/src/bp-groups/actions/join.php#L29|L33
- and there https://github.com/buddypress/buddypress/blob/master/src/bp-templates/bp-nouveau/includes/groups/ajax.php#L104
But it might not just be a matter of switching from logged in user ID to displayed user ID, it's probably a broader issue.
src/bp-templates/bp-nouveau/buddypress/members/single/groups.php
Outdated
Show resolved
Hide resolved
src/bp-templates/bp-legacy/buddypress/members/single/groups.php
Outdated
Show resolved
Hide resolved
Subnavs only register if user can see the page so it looks we don't need these extra controls.
|
Hey @imath, thanks for the review. Actually I've never tried to use |
…domain. This looks like more safer then previous for custom themes and plugins.
|
Hi again @imath, I believe accept/reject buttons should work for admins after my last commits. Can you look again? I also agree about your concern to inform users but I'm not sure where to generate it. |
imath
left a comment
There was a problem hiding this comment.
Hi @adiloztaser
Thanks a lot for your changes 👍. I've just tested, it works as expected. About emailing the user, i'd use the 'groups_reject_invite' & 'groups_accept_invite' hook to check if ( $user_id !== bp_loggedin_user_id() && bp_current_user_can( 'bp_moderate' ) to decide whether to send a notification email.
|
Hi again @imath, I've added an email notification based on your suggestion. I'm also open to any suggestion about current version. |
|
Thanks a lot @adiloztaser for these improvements. I think we should have two specific emails eg: "An administrator accepted an invitation to join {{group.name}} on your behalf. If you disagree with this, you can leave the group at anytime using this link: {{{leave-group.url}}} In this case we don't need the unsubscribe link. The new code you added looks great. |
|
Thank you for feedback @imath, I'll keep working on it. |
|
Hi there. I've added new emails, as you guess to do that I needed to increase the I couldn't add leave url to accepted invate email because we have nonce check and I didn't create a valid url. I've added member groups page, I think it's good enough for navigating user. |
imath
left a comment
There was a problem hiding this comment.
It's looking great thanks a lot for you work on it @adiloztaser
I just think we should do the small changes I suggested in my review 😉
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
Co-authored-by: imath <imathi.eu@outlook.fr>
|
Thank you for review and suggestions @imath. I hope its ready to go. |
imath
left a comment
There was a problem hiding this comment.
Looks good! Thanks a lot @adiloztaser I'll commit it to our SVN Trunk asap.
As a site admin can view the displayed user groups invites, listed invites have to be the one of this user and not the ones of the site admin. Adapt the Group Invites feature so that site admins can accept or reject on behalf of the displayed user the listed invites. These two actions made by an admin will generate a specific BP Email informing the user of it. Props oztaser, dcavins, espellcaste Closes buddypress/buddypress#15 Fixes #8675 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13273 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
As a site admin can view the displayed user groups invites, listed invites have to be the one of this user and not the ones of the site admin. Adapt the Group Invites feature so that site admins can accept or reject on behalf of the displayed user the listed invites. These two actions made by an admin will generate a specific BP Email informing the user of it. Props oztaser, dcavins, espellcaste Closes buddypress/buddypress#15 Fixes #8675 git-svn-id: http://buddypress.svn.wordpress.org/trunk@13273 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
As a site admin can view the displayed user groups invites, listed invites have to be the one of this user and not the ones of the site admin. Adapt the Group Invites feature so that site admins can accept or reject on behalf of the displayed user the listed invites. These two actions made by an admin will generate a specific BP Email informing the user of it. Props oztaser, dcavins, espellcaste Closes buddypress/buddypress#15 Fixes #8675 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13273 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
As a site admin can view the displayed user groups invites, listed invites have to be the one of this user and not the ones of the site admin. Adapt the Group Invites feature so that site admins can accept or reject on behalf of the displayed user the listed invites. These two actions made by an admin will generate a specific BP Email informing the user of it. Props oztaser, dcavins, espellcaste Closes buddypress/buddypress#15 Fixes #8675 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13273 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8675
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.