Opened 7 years ago
Last modified 7 years ago
#41757 new enhancement
Add action inside of add_new_user_to_blog() function
Reported by: | johnjamesjacoby | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | low |
Severity: | minor | Version: | 3.0 |
Component: | Users | Keywords: | has-patch needs-testing |
Focuses: | multisite | Cc: |
Description
When adding a new user to a site in multisite, the full $meta
array is passed in from the relative entry in the wp_signups
database table, but it's impossible to do anything with it here because no action exists in this function.
- A similar action does already exist in
add_existing_user_to_blog()
. - We could use the
wpmu_activate_user
hook, but we'd need to reconfirm if the user was added to the site again, which is not ideal because some complex blog switching may need to occur to do so
I'll attach a patch shortly that adds an action to match add_existing_user_to_blog()
.
Attachments (2)
Change History (7)
#2
@
7 years ago
- Milestone changed from Awaiting Review to Future Release
I think a hook here makes sense.
I *could* see calling it added_new_user_to_blog
to match with the add_new_user_to_blog
action rather than the added_existing_user
action. It at least seems a little less generic then. :)
Also - the function docs need to be updated to indicate that $password
is no longer an ignored parameter, but is passed to the action.
#3
@
7 years ago
I've added a patch which includes the new hook with the proposed name by @jeremyfelt.
To note:
- Updated the docs for
$password
to reflect it's new use. - Added
$blog_id
as the last function to match the main functions order. - Hook is only run when there is no error from
! is_wp_error( $result )
.
Thoughts? :)
#4
@
7 years ago
- Keywords needs-testing added
Is anyone available to test this out? Any opinions on this at all etc?
Adds
added_new_user
action (no prefix, no suffix, because multisite)