From a5c7593856bcc4dd978c537dab3daa86485833e9 Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Fri, 20 Jul 2012 10:46:47 -0400
Subject: [PATCH] Allow email addresses containing apostrophes
---
wp-admin/includes/ms.php | 2 +-
wp-admin/includes/user.php | 2 +-
wp-login.php | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index a6828b2..f874c38 100644
|
a
|
b
|
function send_confirmation_on_profile_email() { |
| 236 | 236 | $hash = md5( $_POST['email'] . time() . mt_rand() ); |
| 237 | 237 | $new_user_email = array( |
| 238 | 238 | 'hash' => $hash, |
| 239 | | 'newemail' => $_POST['email'] |
| | 239 | 'newemail' => stripslashes( $_POST['email'] ) |
| 240 | 240 | ); |
| 241 | 241 | update_option( $current_user->ID . '_new_email', $new_user_email ); |
| 242 | 242 | |
diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php
index ff1e91d..c5358f2 100644
|
a
|
b
|
function edit_user( $user_id = 0 ) { |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if ( isset( $_POST['email'] )) |
| 66 | | $user->user_email = sanitize_text_field( $_POST['email'] ); |
| | 66 | $user->user_email = sanitize_text_field( stripslashes( $_POST['email'] ) ); |
| 67 | 67 | if ( isset( $_POST['url'] ) ) { |
| 68 | 68 | if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { |
| 69 | 69 | $user->user_url = ''; |
diff --git a/wp-login.php b/wp-login.php
index 50088db..068f3d5 100644
|
a
|
b
|
case 'register' : |
| 522 | 522 | $user_email = ''; |
| 523 | 523 | if ( $http_post ) { |
| 524 | 524 | $user_login = $_POST['user_login']; |
| 525 | | $user_email = $_POST['user_email']; |
| | 525 | $user_email = stripslashes( $_POST['user_email'] ); |
| 526 | 526 | $errors = register_new_user($user_login, $user_email); |
| 527 | 527 | if ( !is_wp_error($errors) ) { |
| 528 | 528 | $redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered'; |