Make user option name sanitization consistent. Props filosofo. fixes #5901

git-svn-id: http://svn.automattic.com/wordpress/trunk@6902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-18 20:16:02 +00:00
parent 2169d4e439
commit 0a875e8b22
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ function user_pass_ok($user_login,$user_pass) {
function get_user_option( $option, $user = 0 ) {
global $wpdb;
$option = preg_replace('|[^a-z0-9_]|i', '', $option);
if ( empty($user) )
$user = wp_get_current_user();
else