WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#33008 closed enhancement (fixed)

Add action that fires when inviting a user

Reported by: ebinnion Owned by: wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.0
Component: Users Keywords: has-patch commit
Focuses: administration, multisite Cc:
PR Number:

Description

I am currently looking into adding WordPress.com notifications that fire when a user is invited to a site.

While it is possible to use the add_option hook and then check that $option is of the form new_user_, I don't believe it is optimal.

I suggest that we add a new action that is fired during the invite user process.

Attachments (3)

33008.1.diff (881 bytes) - added by ebinnion 5 years ago.
Adds invite_user action
33008.2.diff (791 bytes) - added by MikeHansenMe 4 years ago.
33008.diff (790 bytes) - added by DrewAPicture 4 years ago.
Fixed docs

Download all attachments as: .zip

Change History (10)

@ebinnion
5 years ago

Adds invite_user action

#1 @johnbillion
5 years ago

  • Focuses multisite added
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from trunk to 3.0

#2 @dd32
4 years ago

In the proposed patch, I think the current_user parameter can be skipped.. Any hooked functions can simply grab the logged in users details if they need that detail.

#3 @wonderboymusic
4 years ago

  • Keywords needs-refresh added
  • Milestone changed from Future Release to 4.4

@MikeHansenMe
4 years ago

#4 @MikeHansenMe
4 years ago

  • Keywords needs-refresh removed

#5 @wonderboymusic
4 years ago

  • Keywords commit added
  • Owner set to DrewAPicture
  • Status changed from new to reviewing

@DrewAPicture
4 years ago

Fixed docs

#6 @DrewAPicture
4 years ago

  • Owner changed from DrewAPicture to wonderboymusic

33008.diff fixes the docs formatting and adjusts the summary to more closely explain the point of firing.

#7 @SergeyBiryukov
4 years ago

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

In 33732:

Multisite: Add 'invite_user' action that fires immediately after a user is invited to join a site, but before the notification is sent.

props ebinnion, MikeHansenMe, DrewAPicture.
fixes #33008.

Note: See TracTickets for help on using tickets.