Skip to content

Instantly share code, notes, and snippets.

Created Jul 21, 2022
What would you like to do?
/* Force email lowercase on WordPress registration
------------------------------------------------------------------ */
function filter_pre_user_email( $raw_user_email ) {
$raw_user_email = strtolower($raw_user_email);
return $raw_user_email;
// add the filter
add_filter( 'pre_user_email', 'filter_pre_user_email', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment