Wordpress 3.5.2
[autoinstalls/wordpress.git] / wp-includes / user.php
index 7bdc37cc76f51b576284f125dc3c7e9140dcf416..57f1ec94f97851fa39b5f613e12b03aa27736d12 100644 (file)
@@ -474,7 +474,7 @@ class WP_User_Query {
                                        $search_columns = array('user_email');
                                elseif ( is_numeric($search) )
                                        $search_columns = array('user_login', 'ID');
-                               elseif ( preg_match('|^https?://|', $search) && ! wp_is_large_network( 'users' ) )
+                               elseif ( preg_match('|^https?://|', $search) && ! ( is_multisite() && function_exists( 'wp_is_large_network' ) && wp_is_large_network( 'users' ) ) )
                                        $search_columns = array('user_url');
                                else
                                        $search_columns = array('user_login', 'user_nicename');
@@ -1452,6 +1452,8 @@ function wp_update_user($userdata) {
 
        // First, get all of the original fields
        $user_obj = get_userdata( $ID );
+       if ( ! $user_obj )
+               return new WP_Error( 'invalid_user_id', __( 'Invalid user ID' ) );
 
        $user = $user_obj->to_array();