summaryrefslogtreecommitdiffstats
path: root/wp-includes/pluggable.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/pluggable.php')
-rw-r--r--wp-includes/pluggable.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 949e603..3668635 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -162,7 +162,7 @@ function get_userdatabylogin($user_login) {
}
endif;
-if ( !function_exists('wp_mail') ) :
+if ( !function_exists( 'wp_mail' ) ) :
function wp_mail($to, $subject, $message, $headers = '') {
global $phpmailer;
@@ -174,11 +174,11 @@ function wp_mail($to, $subject, $message, $headers = '') {
$mail = compact('to', 'subject', 'message', 'headers');
$mail = apply_filters('wp_mail', $mail);
- extract($mail);
+ extract($mail, EXTR_SKIP);
if ( $headers == '' ) {
$headers = "MIME-Version: 1.0\n" .
- "From: " . get_option('admin_email') . "\n" .
+ "From: " . apply_filters('wp_mail_from', get_option('admin_email') ) . "\n" .
"Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
}
@@ -230,6 +230,8 @@ if ( !function_exists('wp_login') ) :
function wp_login($username, $password, $already_md5 = false) {
global $wpdb, $error;
+ $username = sanitize_user($username);
+
if ( '' == $username )
return false;