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.
Built from https://develop.svn.wordpress.org/trunk@39544


git-svn-id: http://core.svn.wordpress.org/trunk@39484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2016-12-08 03:58:45 +00:00
parent 76a5b4f3c2
commit 3a0e61e680
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39543';
$wp_version = '4.8-alpha-39544';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

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';