added_existing_user
Action HookDescription
Fires immediately after an existing user is added to a site.Hook Information
File Location |
wp-includes/ms-functions.php
View on GitHub
|
Hook Type | Action |
Line Number | 2289 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$user_id
|
User ID. |
true|WP_Error
|
$result
|
True on success or a WP_Error object if the user doesn't exist or could not be added. |
Usage Examples
Basic Usage
<?php
// Hook into added_existing_user
add_action('added_existing_user', 'my_custom_function', 10, 2);
function my_custom_function($user_id, $result) {
// Your custom code here
}
Source Code Context
wp-includes/ms-functions.php:2289
- How this hook is used in WordPress core
<?php
2284 *
2285 * @param int $user_id User ID.
2286 * @param true|WP_Error $result True on success or a WP_Error object if the user doesn't exist
2287 * or could not be added.
2288 */
2289 do_action( 'added_existing_user', $details['user_id'], $result );
2290
2291 return $result;
2292 }
2293 }
2294
PHP Documentation
<?php
/**
* Fires immediately after an existing user is added to a site.
*
* @since MU (3.0.0)
*
* @param int $user_id User ID.
* @param true|WP_Error $result True on success or a WP_Error object if the user doesn't exist
* or could not be added.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-includes/ms-functions.php
Related Hooks
Related hooks will be displayed here in future updates.