Make WordPress Core

Opened 10 years ago

Last modified 11 months ago

#38750 new feature request

Split wp_signups into wp_user_signups and wp_blog_signups

Reported by: johnjamesjacoby Owned by:
Priority: normal Milestone: Awaiting Review
Component: Login and Registration Version: 3.0
Severity: normal Keywords: 2nd-opinion needs-screenshots needs-unit-tests needs-patch
Cc: Focuses: multisite

Description

Right now, wp_signups (and the entire related API) does double-duty. It's 1 database table that's used for both users & blogs, but there are a few issues with this approach:

  • Open sign-ups may or may not include ability to create sites
  • There is no UI for managing sign-ups in WordPress core
  • Sign-ups are different between singlesite & multi-site
  • Plugins like BuddyPress do their best to include and/or work-around WordPress's core functionality, but end up writing a ton of additional code to manage this
  • Other membership plugins are forced to roll their own approach every single time
  • It's possible for multisite sign-up race conditions to exist, with users & sites created or activated from underneath each other (documented in wpmu_activate_signup())

I'm adding the multisite focus to this issue, because all of the current code is only relevant to multisite, but I'd like to see single-site inherit whatever future approach we can come up with.

The core sign-ups code, stinks. Yet open registration is part of what makes WordPress & community/membership sites great. I think it would be great to take what we've learned from BuddyPress, WordPress.org, WordPress.com, and the bevy of Membership plugins, and make a great sign-up component/API for WordPress core.

Change History (6)

#1 @johnjamesjacoby
10 years ago

  • Keywords 2nd-opinion needs-screenshots needs-unit-tests needs-patch added

#2 @johnjamesjacoby
10 years ago

An alternative would be to ditch wp_signups all together, and add status and creator columns to wp_blogs.

Then, when a user is activated, the process would be:

  • Check wp_users::user_activation_key
  • Switch their user_status from pending to active
  • Check for wp_blogs::status in pending with a matching creator_id to the wp_users::user_id
  • Switch wp_blogs::status from pending to active

This has the net positives of:

  • Eliminating an unloved API
  • Removing a weird database table
  • Unifying sign-ups across single & multi site installation types
  • Giving plugins a reliable API & schema to use going forward

...at the cost of...

  • Needing to refactor the existing WPMU specific code
  • Deprecating a truckload of code
  • Updating various interfaces to include "Pending" users, and the associated links to handle manual activation, etc...
  • Developer awareness that wp_signups is going away
  • Probably a several step, several release cycle development plan

See also #34316.

#3 @Mista-Flo
10 years ago

+1 on this needed refactoring, it will be far easier to deal with signups with this approach.

This ticket was mentioned in ​Slack in #core-multisite by florian-tiar. ​View the logs.


10 years ago

#5 @eArtboard
7 years ago

+1 on this sign-ups on multisite should match the UI of single site.

#6 @madriverweb
11 months ago

What is the status of this? I'm writing because I'm trying to learn something/anything about why the wp_signups table exists. I have a multi-site, and I have a few legitimate users in this table who are noted as active. But 95% of the users are spam and I don't know how they are being added to this table. Can you please tell me what URL they are going to to add themselves?

Last edited 11 months ago by madriverweb (previous) (diff)
Note: See TracTickets for help on using tickets.