Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/17/2013 07:00:46 PM (10 years ago)
Author:
boonebgorges
Message:

Improve UX flow around overlapping group invites and requests

This changeset introduces a number of improvements to the flow surrounding
invitations and membership requests to private groups:

  • When a user has previously requested membership in a group, add a note to that effect when the user is being invited to the group via the Send Invites interface.
  • When a user has previously requested membership in a group, automatically accept that invitation and add the user to the group when an invitation is sent by an existing group member.
  • When a user has previously been invited to a group, buttons in the group directory and in the group header should read Accept Invitation instead of Request Membership

The end result is a more logical user experience with regard to joining private
groups.

Fixes #5032

Props Mike_Cowobo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-screens.php

    r7440 r7442  
    479479    if ( 'private' != $bp->groups->current_group->status )
    480480        return false;
     481
     482    // If the user is already invited, accept invitation
     483    if ( groups_check_user_has_invite( bp_loggedin_user_id(), $bp->groups->current_group->id ) ) {
     484        if ( groups_accept_invite( bp_loggedin_user_id(), $bp->groups->current_group->id ) )
     485            bp_core_add_message( __( 'Group invite accepted', 'buddypress' ) );
     486        else
     487            bp_core_add_message( __( 'There was an error accepting the group invitation, please try again.', 'buddypress' ), 'error' );
     488        bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) );
     489    }
    481490
    482491    // If the user has submitted a request, send it.
Note: See TracChangeset for help on using the changeset viewer.