Title: added_existing_user
Published: April 25, 2014
Last modified: April 28, 2025

---

# do_action( ‘added_existing_user’, int $user_id, true|WP_Error $result )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#wp--skip-link--target)

Fires immediately after an existing user is added to a site.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#parameters)󠁿

 `$user_id`int

User ID.

`$result`true|[WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)

True on success or a [WP_Error](https://developer.wordpress.org/reference/classes/wp_error/)
object if the user doesn’t exist or could not be added.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#source)󠁿

    ```php
    do_action( 'added_existing_user', $details['user_id'], $result );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/ms-functions.php#L2289)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/ms-functions.php#L2289-L2289)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#related)󠁿

| Used by | Description | 
| [add_existing_user_to_blog()](https://developer.wordpress.org/reference/functions/add_existing_user_to_blog/)`wp-includes/ms-functions.php` |

Adds a user to a blog based on details from [maybe_add_existing_user_to_blog()](https://developer.wordpress.org/reference/functions/maybe_add_existing_user_to_blog/) .

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/added_existing_user/?output_format=md#changelog)󠁿

| Version | Description | 
| [MU (3.0.0)](https://developer.wordpress.org/reference/since/mu.3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadded_existing_user%2F)
before being able to contribute a note or feedback.