Added stripslashes to get_userdata()

Reported on the support forums http://wordpress.org/support/3/376


git-svn-id: http://svn.automattic.com/wordpress/trunk@271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mikelittle 2003-07-24 00:41:40 +00:00
parent 1abd58c0b7
commit 2cc31e7848
1 changed files with 6 additions and 1 deletions

View File

@ -415,7 +415,12 @@ function get_userdata($userid) {
global $wpdb, $querycount, $cache_userdata, $use_cache, $tableusers;
if ((empty($cache_userdata[$userid])) || (!$use_cache)) {
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = $userid");
++$querycount;
$user->user_nickname = stripslashes($user->user_nickname);
$user->user_firstname = stripslashes($user->user_firstname);
$user->user_lastname = stripslashes($user->user_lastname);
$user->user_firstname = stripslashes($user->user_firstname);
$user->user_lastname = stripslashes($user->user_lastname);
++$querycount;
$cache_userdata[$userid] = $user;
} else {
$user = $cache_userdata[$userid];