Allow apostrophes in email address during wp-login.php registration.

See #18039 for a related fix when creating users via the Dashboard.

Props tomdxw.
Fixes #34483.

git-svn-id: https://develop.svn.wordpress.org/trunk@39544 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2016-12-08 03:57:08 +00:00
parent d3aa41cf19
commit 07b8be1177

View File

@ -697,7 +697,7 @@ case 'register' :
$user_email = '';
if ( $http_post ) {
$user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : '';
$user_email = isset( $_POST['user_email'] ) ? $_POST['user_email'] : '';
$user_email = isset( $_POST['user_email'] ) ? wp_unslash( $_POST['user_email'] ) : '';
$errors = register_new_user($user_login, $user_email);
if ( !is_wp_error($errors) ) {
$redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';