Changeset 17084
- Timestamp:
- 12/20/2010 04:25:35 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r17009 r17084 66 66 do_action( 'delete_blog', $blog_id, $drop ); 67 67 68 $users = get_users _of_blog( $blog_id);68 $users = get_users( array( 'blog_id' => $blog_id, 'fields' => 'ids' ) ); 69 69 70 70 // Remove users from this blog. 71 71 if ( ! empty( $users ) ) { 72 foreach ( $users as $user ) {73 remove_user_from_blog( $user ->ID, $blog_id) ;72 foreach ( $users as $user_id ) { 73 remove_user_from_blog( $user_id, $blog_id) ; 74 74 } 75 75 } -
trunk/wp-admin/network/edit.php
r17042 r17084 53 53 <?php 54 54 foreach ( (array) $blogs as $key => $details ) { 55 $blog_users = get_users _of_blog( $details->userblog_id);55 $blog_users = get_users( array( 'blog_id' => $details->userblog_id ) ); 56 56 if ( is_array( $blog_users ) && !empty( $blog_users ) ) { 57 57 $user_site = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>"; -
trunk/wp-includes/deprecated.php
r17009 r17084 2417 2417 2418 2418 /** 2419 * Get users for the blog. 2420 * 2421 * For setups that use the multi-blog feature. Can be used outside of the 2422 * multi-blog feature. 2423 * 2424 * @since 2.2.0 2425 * @deprecated 3.1.0 2426 * @uses $wpdb WordPress database object for queries 2427 * @uses $blog_id The Blog id of the blog for those that use more than one blog 2428 * 2429 * @param int $id Blog ID. 2430 * @return array List of users that are part of that Blog ID 2431 */ 2432 function get_users_of_blog( $id = '' ) { 2433 _deprecated_function( __FUNCTION__, '3.1', 'get_users()' ); 2434 2435 global $wpdb, $blog_id; 2436 if ( empty($id) ) 2437 $id = (int) $blog_id; 2438 $blog_prefix = $wpdb->get_blog_prefix($id); 2439 $users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" ); 2440 return $users; 2441 } 2442 2443 /** 2419 2444 * Enable/disable automatic general feed link outputting. 2420 2445 * -
trunk/wp-includes/user.php
r17034 r17084 620 620 621 621 /** 622 * Get users for the blog.623 *624 * For setups that use the multi-blog feature. Can be used outside of the625 * multi-blog feature.626 *627 * @since 2.2.0628 * @uses get_users() for queries629 * @uses $blog_id The Blog id of the blog for those that use more than one blog630 *631 * @param int $id Blog ID.632 * @return array List of users that are part of that Blog ID633 */634 function get_users_of_blog( $id = '' ) {635 if ( empty( $id ) )636 $id = get_current_blog_id();637 638 return get_users( array( 'blog_id' => $id ) );639 }640 641 /**642 622 * Get the blogs a user belongs to. 643 623 *
Note: See TracChangeset
for help on using the changeset viewer.