*/
/**
- * @since unknown
+ * @since MU
* @deprecated 3.0.0
* @deprecated Use wp_generate_password()
* @see wp_generate_password()
if ( !$user_id )
return false;
} else {
- $user = new WP_User( null, $user_login) ;
- if ( empty( $user->id ) )
+ $user = get_user_by( 'login', $user_login );
+ if ( empty( $user->ID ) )
return false;
- $user_id = $user->id;
+ $user_id = $user->ID;
}
return is_super_admin( $user_id );
/**
* @since MU
* @deprecated 3.0.0
- * @deprecated Don't use this, really.
+ * @deprecated No alternative available. For performance reasons this function is not recommended.
*/
function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) {
- _deprecated_function( __FUNCTION__, '3.0', "Don't use this, really." );
+ _deprecated_function( __FUNCTION__, '3.0' );
global $wpdb;
$blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A );
/**
* @since MU
* @deprecated 3.0.0
- * @deprecated Don't use this, really.
+ * @deprecated No alternative available. For performance reasons this function is not recommended.
*/
function get_most_active_blogs( $num = 10, $display = true ) {
- _deprecated_function( __FUNCTION__, '3.0', "Don't use this, really." );
+ _deprecated_function( __FUNCTION__, '3.0' );
$blogs = get_blog_list( 0, 'all', false ); // $blog_id -> $details
if ( is_array( $blogs ) ) {