itthinx / groups

Groups provides group-based user membership management, group-based capabilities and content access control. It integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.
GNU General Public License v3.0
49 stars 35 forks source link

groups_created_user_group Action not returning $group_id #55

Closed Jursdotme closed 9 months ago

Jursdotme commented 8 years ago

Im trying to send a mail when a user is added to a certain group, but the groups_created_user_group action isn't returning any group id ($group_id).

Im trying to use the action documented here.

JoryHogeveen commented 7 years ago

Did you set your action correctly to take two parameters? By default WordPress only sends the first parameter unless you ask for more.

// Default: this will only send one parameter
add_action( 'groups_created_user_group', 'my_callback' );

// This will send two parameters >> 10 is priority, 2 is number of parameters
add_action( 'groups_created_user_group', 'my_callback', 10, 2 );