user_registration_email
Filter HookDescription
Filters the email address of a user being registered.Hook Information
File Location |
wp-includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3468 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$user_email
|
The email address of the new user. |
Usage Examples
Basic Usage
<?php
// Hook into user_registration_email
add_filter('user_registration_email', 'my_custom_filter', 10, 1);
function my_custom_filter($user_email) {
// Your custom filtering logic here
return $user_email;
}
Source Code Context
wp-includes/user.php:3468
- How this hook is used in WordPress core
<?php
3463 *
3464 * @since 2.1.0
3465 *
3466 * @param string $user_email The email address of the new user.
3467 */
3468 $user_email = apply_filters( 'user_registration_email', $user_email );
3469
3470 // Check the username.
3471 if ( '' === $sanitized_user_login ) {
3472 $errors->add( 'empty_username', __( '<strong>Error:</strong> Please enter a username.' ) );
3473 } elseif ( ! validate_username( $user_login ) ) {
PHP Documentation
<?php
/**
* Filters the email address of a user being registered.
*
* @since 2.1.0
*
* @param string $user_email The email address of the new user.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/user.php
Related Hooks
Related hooks will be displayed here in future updates.