From 854c4d8fa73c5b610a7e8e561dbf27f9669827a3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 29 Apr 2010 20:19:47 +0000 Subject: [PATCH] Always replace dashes with underscores for keys in get_user_option(). git-svn-id: https://develop.svn.wordpress.org/trunk@14309 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/user.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 96c746b16d..8d34d12007 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -238,13 +238,13 @@ function get_user_option( $option, $user = 0, $deprecated = '' ) { if ( empty($user) ) { $user = wp_get_current_user(); - // Keys used as object vars cannot have dashes. - $key = str_replace('-', '_', $option); } else { $user = get_userdata($user); - $key = $option; } + // Keys used as object vars cannot have dashes. + $key = str_replace('-', '_', $option); + if ( isset( $user->{$wpdb->prefix . $key} ) ) // Blog specific $result = $user->{$wpdb->prefix . $key}; elseif ( isset( $user->{$key} ) ) // User specific and cross-blog