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:
parent
2169d4e439
commit
0a875e8b22
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue