Opened 10 years ago
Last modified 3 weeks ago
#31127 assigned defect (bug)
Can't add a new user to two sites before they've accepted their account
Reported by: | ericlewis | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Users | Keywords: | has-patch needs-unit-tests needs-testing |
Focuses: | multisite | Cc: |
Description
In multisite, when adding a new user to a site, the user account isn't created immediately. Their info is stored in the wp_signups
table until the user checks their email and clicks their sign-up acceptance link.
If an admin attempts to invite the user to a second site before the person has accepted their user account for the first, they'll get this message:
That username is currently reserved but may be available in a couple of days.
That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.
Attachments (1)
Change History (13)
#2
follow-up:
↓ 9
@
10 years ago
Signups are stored as rows in the signups table. When a person is invited to a blog, the blog id is stored in a serialized array under the add_to_blog
key in the meta
column. I wonder if we could support saving add_to_blog
as an array, and add the user to all these sites when activated1 maintaining backwards compatibility.
On a related note, it's odd that a site administrator is choosing a username for another person. An email is an existing, (relatively) unique identifier for this person. Preferably that person can choose their username. Removing that might help here. Two separate site admins might invite a person using the same email address, but might pick different usernames for them.
This ticket was mentioned in Slack in #core-multisite by eric. View the logs.
10 years ago
#4
@
10 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
This could definitely put a kink in the workflow of anyone trying to add a user to multiple sites quickly.
I wonder if we could support saving add_to_blog as an array, and add the user to all these sites
At first glance, I don't see why not.
#5
@
9 years ago
- Keywords has-patch needs-unit-tests added; needs-patch removed
- Milestone changed from Future Release to 4.5
attachment:31127.diff is a work in progress, feedback welcome :)
It's backwards compatible with the current format of the signups meta
column. Instead of making this field an array, it adds an array element named other_blogs
where, if a user is signed up for more than one site, the other site signup info is stored.
Some modifications to wpmu_validate_user_signup()
were added, to ignore user_name and user_email collisions if the signup is for a site different than current_blog
.
This ticket was mentioned in Slack in #core-multisite by eric. View the logs.
9 years ago
#8
@
9 years ago
- Owner set to jeremyfelt
- Status changed from new to assigned
I worry about this happening now that we are halfway through Beta, but @jeremyfelt knows Multisite the best and can consider if there is likely to be much fallout, so I'll let him make the call.
#9
in reply to:
↑ 2
@
9 years ago
- Keywords needs-testing added
- Milestone changed from 4.5 to Future Release
We probably want to wait. Things are so funky around signups.
With 31127.diff applied:
- When adding the user to a second site, a new email notification is sent out with a new, but invalid, activation key. We should make sure that any additional emails have the same activation key that is attached to the main
wp_signups
record. - Even with a pending activation, it's possible to add the user to a new site and skip the confirmation process. This leaves a signup in a pending state. Can we warn the admin and then automatically activate the other signup(s)?
- If I add a pending user and skip the confirmation the confirmation process and they then activate their account, their password notification seems to never arrive. (In my single test with Mailcatcher)
Replying to ericlewis:
On a related note, it's odd that a site administrator is choosing a username for another person. An email is an existing, (relatively) unique identifier for this person. Preferably that person can choose their username. Removing that might help here. Two separate site admins might invite a person using the same email address, but might pick different usernames for them.
It makes sense in some ways, though it would be useful to allow for multiple workflows here. The entire Add New User screen is confusing in this way. That you even have to choose between adding an existing and new user to begin with drives me crazy. Expanding on that would start to hijack this ticket though. :)
Related: #16001