Skip to:
Content

BuddyPress.org

Opened 13 months ago

Closed 7 months ago

#8693 closed enhancement (fixed)

Site Members Invitations & configs using signups only

Reported by: imath's profile imath Owned by: dcavins's profile dcavins
Milestone: 11.0.0 Priority: normal
Severity: normal Version: 8.0.0
Component: Members Keywords: commit
Cc:

Description

I've recently noticed the Site Members Invitations feature was only available on regular WordPress configs. If it's a multisite one or a a "single" site one using the BP_SIGNUPS_SKIP_USER_CREATION constant, it just fails activating the account.

I think we shouldn't rely on this bp_get_user_meta( $user_id, 'activation_key', true ); or the wp_user ID for the feature. BTW, imho, WordPress single site shouldn't create the user on "single" site registration.

I wonder if the invitation hash used could be replaced by the activation key so that we could directly query the signup to validate the invitation instead.

I'd like we investigate this improvement which would make the feature available for all BuddyPress configs.

Attachments (1)

8693.1.diff (1.7 KB) - added by dcavins 7 months ago.
SIte invitations: Do not assume that a user exists. a651ce5f5 In some BuddyPress setups, a user is not created until the signup has been activated. This is the case when BP_SIGNUPS_SKIP_USER_CREATION is set to true and when installed on a WodPress network. So we rely on the BP_Signup instead of the dodgy user in bp_members_invitations_complete_signup().

Download all attachments as: .zip

Change History (8)

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


13 months ago

#2 @dcavins
13 months ago

  • Owner set to dcavins
  • Status changed from new to assigned

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


11 months ago

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


8 months ago

@dcavins
7 months ago

SIte invitations: Do not assume that a user exists. a651ce5f5 In some BuddyPress setups, a user is not created until the signup has been activated. This is the case when BP_SIGNUPS_SKIP_USER_CREATION is set to true and when installed on a WodPress network. So we rely on the BP_Signup instead of the dodgy user in bp_members_invitations_complete_signup().

#5 @dcavins
7 months ago

The attached patch works for me when tested with single sites (with and without BP_SIGNUPS_SKIP_USER_CREATION set) and in a WP Network setup. Please let me know if there is another configuration that I need to be testing.

Happily, it was simpler than expected to fix.

#6 @imath
7 months ago

  • Keywords commit added; dev-feedback removed

Hi @dcavins,

Thanks a lot for your work on this. I've tested it and I confirm it's fixing the issue, let's have this in ✅

#7 @dcavins
7 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13346:

Site invitations: Do not assume that a user exists.

In some BuddyPress setups, a user is not created
until the signup has been activated. This is the case
when BP_SIGNUPS_SKIP_USER_CREATION is set
to true or when BP is installed on a WodPress network.
So we rely on the BP_Signup instead of the dodgy
user_id in bp_members_invitations_complete_signup().

Fixes #8693.

Note: See TracTickets for help on using tickets.