@@ 186-204 (lines=19) @@ | ||
183 | do_action( 'jetpack_deleted_user', $deleted_user_id, $reassigned_user_id, $is_multisite ); |
|
184 | } |
|
185 | ||
186 | function user_register_handler( $user_id, $old_user_data = null ) { |
|
187 | // ensure we only sync users who are members of the current blog |
|
188 | if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { |
|
189 | return; |
|
190 | } |
|
191 | ||
192 | if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) { |
|
193 | $this->add_flags( $user_id, array( 'invitation_accepted' => true ) ); |
|
194 | } |
|
195 | /** |
|
196 | * Fires when a new user is registered on a site |
|
197 | * |
|
198 | * @since 4.9.0 |
|
199 | * |
|
200 | * @param object The WP_User object |
|
201 | */ |
|
202 | do_action( 'jetpack_sync_register_user', $user_id, $this->get_flags( $user_id ) ); |
|
203 | ||
204 | } |
|
205 | ||
206 | function add_user_to_blog_handler( $user_id, $old_user_data = null ) { |
|
207 | // ensure we only sync users who are members of the current blog |
|
@@ 206-223 (lines=18) @@ | ||
203 | ||
204 | } |
|
205 | ||
206 | function add_user_to_blog_handler( $user_id, $old_user_data = null ) { |
|
207 | // ensure we only sync users who are members of the current blog |
|
208 | if ( ! is_user_member_of_blog( $user_id, get_current_blog_id() ) ) { |
|
209 | return; |
|
210 | } |
|
211 | ||
212 | if ( Jetpack_Constants::is_true( 'JETPACK_INVITE_ACCEPTED' ) ) { |
|
213 | $this->add_flags( $user_id, array( 'invitation_accepted' => true ) ); |
|
214 | } |
|
215 | /** |
|
216 | * Fires when a user is added on a site |
|
217 | * |
|
218 | * @since 4.9.0 |
|
219 | * |
|
220 | * @param object The WP_User object |
|
221 | */ |
|
222 | do_action( 'jetpack_sync_add_user', $user_id, $this->get_flags( $user_id ) ); |
|
223 | } |
|
224 | ||
225 | function save_user_handler( $user_id, $old_user_data = null ) { |
|
226 | // ensure we only sync users who are members of the current blog |