user_registration_email
Filters the email address of a user being registered.
Description
Parameters (1)
- 0. $user_email (string)
- The email address of the new user.
Usage
- To run the hook, copy the example below.
- $user_email = apply_filters( 'user_registration_email', $user_email );
- if ( !empty( $user_email ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the user_registration_email callback
- function filter_user_registration_email( $user_email ) {
- // make filter magic happen here...
- return $user_email;
- };
- // add the filter
- add_filter( 'user_registration_email', 'filter_user_registration_email', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'user_registration_email', 'filter_user_registration_email', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/user.php
- $user_email = apply_filters( 'user_registration_email', $user_email );