[buddypress-trac] [BuddyPress Trac] #8582: Add site membership requests.

buddypress-trac noreply at wordpress.org
Sun Oct 10 16:47:26 UTC 2021


#8582: Add site membership requests.
-------------------------------------+---------------------
 Reporter:  dcavins                  |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  10.0.0
Component:  Members                  |     Version:  9.1.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+---------------------

Comment (by imath):

 Here are my first feedbacks @dcavins. For now I haven't reviewed the patch
 in detail to focus on the feature's (needed imho) improvements.

 Thanks a lot for this first pass about the feature. It's already very
 promising and it should work great when the registration process creates a
 User, but...


 ==== 1) About the BuddyPress/WordPress signup process ====

 There is only 1 case where a user is created once they submit the
 registration form: when WordPress is not multisite and when the
 `BP_SIGNUPS_SKIP_USER_CREATION` is not defined or `false`.

 **As a result, I strongly discourage you to use data from the wp_users
 table for this feature.**


 ==== 2) About the setting: ====
 Would it be better to name the feature "site membership requests" instead
 of "network membership requests" if WordPress is not multisite or if
 BuddyPress is not network activated?

 - The checkbox should be readonly until the required signup option matches
 the need for disabling public registration.
 - We should probably include a link to where to turn public registration
 off.
 - This setting can't be `1` or `0` imho because of Multisite registration
 possibilities (account, account + blog).


 ==== 3) What's the strategy to add the link to request a membership? ====
 Should we include a link to the `wp-login.php` form at the minimum?


 ==== 4) Testing the patch: ====

 PS: On purpose (I knew doing so I'll get some errors 😆) I've set the
 `BP_SIGNUPS_SKIP_USER_CREATION` constant to true.

 ===== 4.1) Once I submit the form I got a success message but also a
 notice error:=====

 > Undefined variable $item_id in /path-to/buddypress/src/bp-members/bp-
 members-membership-requests.php on line 119
 You should probably use `$signup->id` instead.

 ===== 4.2) If i go to the Manage signups screen, the request is listed
 but: =====

 > Warning: Attempt to read property "ID" on bool in /path-
 to/buddypress/src/bp-members/bp-members-notifications.php on line 85

 That's because as I've explained above: the user wasn't created, because
 I've set the `BP_SIGNUPS_SKIP_USER_CREATION` constant to `true`.

 I don't get the `Extended` link for the user requesting a site membership.
 See screenshot below:

 [[Image(https://cldup.com/Y1fEPCZIKA.jpg)]]

 If I click on the notification link, nothing happens unlike what the 6
 -manage-single-view.png shows. I stay on the Signup list. That's because
 of the `BP_SIGNUPS_SKIP_USER_CREATION` constant, but it would also be the
 case for Multisite configs. Using the Extended Profile is an interesting
 idea, but I believe we need more work to use a UI that is available for
 any WordPress/BuddyPress configs.

 ===== 4.3) Possible improvements/questions : =====

 - Could we have like it's the case for pending comments a specific yellow
 background applied to the row?
 - What about a row action to reject with an email message the request?
 - When clicking on the Activate row action in this case, how is the
 requesting user informed their account has been activated?
 - The approve request row Action should lead to an adapted "Resend
 Activation Emails" screen:
   - page title = "Approve request(s)"
   - description = "You are about to approve the following request(s)"


 ==== 5) About the admin email notice content ====

 > To learn more about the site, visit: {{{site.url}}}
 What are we supposed to learn more, as an Admin I know my site, don't I?
 I'd remove this part from the email. This may only be interesting for
 multisite configs.

 > To view {{requesting-user.name}}'s profile, visit: {{{profile.url}}}
 As on multisite or if `BP_SIGNUPS_SKIP_USER_CREATION` is true : the User
 is not created: this should fail (I wasn't able to test emails on my
 config). It should be the link to open the Admin UI made available for any
 WordPress/BuddyPress configs.


 ==== Conclusion: ====

 As I've said it's very promising and you already did some great work about
 it. But I believe we need some more work to take in account the 2 other
 signup processes you haven't covered so far 😁

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8582#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list