@@ 248-267 (lines=20) @@ | ||
245 | do_action( 'jetpack_deleted_user', $deleted_user_id, $reassigned_user_id, $is_multisite ); |
|
246 | } |
|
247 | ||
248 | function user_register_handler( $user_id, $old_user_data = null ) { |
|
249 | // ensure we only sync users who are members of the current blog |
|
250 | if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { |
|
251 | return; |
|
252 | } |
|
253 | ||
254 | if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) { |
|
255 | $this->add_flags( $user_id, array( 'invitation_accepted' => true ) ); |
|
256 | } |
|
257 | /** |
|
258 | * Fires when a new user is registered on a site |
|
259 | * |
|
260 | * @since 4.9.0 |
|
261 | * |
|
262 | * @param object The WP_User object |
|
263 | */ |
|
264 | do_action( 'jetpack_sync_register_user', $user_id, $this->get_flags( $user_id ) ); |
|
265 | $this->clear_flags( $user_id ); |
|
266 | ||
267 | } |
|
268 | ||
269 | function add_user_to_blog_handler( $user_id, $old_user_data = null ) { |
|
270 | // ensure we only sync users who are members of the current blog |
|
@@ 269-287 (lines=19) @@ | ||
266 | ||
267 | } |
|
268 | ||
269 | function add_user_to_blog_handler( $user_id, $old_user_data = null ) { |
|
270 | // ensure we only sync users who are members of the current blog |
|
271 | if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { |
|
272 | return; |
|
273 | } |
|
274 | ||
275 | if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) { |
|
276 | $this->add_flags( $user_id, array( 'invitation_accepted' => true ) ); |
|
277 | } |
|
278 | /** |
|
279 | * Fires when a user is added on a site |
|
280 | * |
|
281 | * @since 4.9.0 |
|
282 | * |
|
283 | * @param object The WP_User object |
|
284 | */ |
|
285 | do_action( 'jetpack_sync_add_user', $user_id, $this->get_flags( $user_id ) ); |
|
286 | $this->clear_flags( $user_id ); |
|
287 | } |
|
288 | ||
289 | function save_user_handler( $user_id, $old_user_data = null ) { |
|
290 | // ensure we only sync users who are members of the current blog |