summaryrefslogtreecommitdiffstats
path: root/wp-includes/user.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-01 08:59:00 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-01 08:59:00 +0000
commit3e374fafd80d1bdddbb9bd2ed76ff34a11fa9c9a (patch)
tree05cfb5ef9c1ec7fce90340fa728d5534fe948e2c /wp-includes/user.php
parent47bbd1a907d44da6e2a68aef7d03f725c5b16111 (diff)
downloadwordpress-mu-3e374fafd80d1bdddbb9bd2ed76ff34a11fa9c9a.tar.gz
wordpress-mu-3e374fafd80d1bdddbb9bd2ed76ff34a11fa9c9a.tar.xz
wordpress-mu-3e374fafd80d1bdddbb9bd2ed76ff34a11fa9c9a.zip
WP Merge to rev 4854
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@876 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/user.php')
-rw-r--r--wp-includes/user.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/wp-includes/user.php b/wp-includes/user.php
index 4d202a6..00b58d2 100644
--- a/wp-includes/user.php
+++ b/wp-includes/user.php
@@ -50,6 +50,16 @@ function update_user_option( $user_id, $option_name, $newvalue, $global = false
return update_usermeta( $user_id, $option_name, $newvalue );
}
+// Get users with capabilities for the current blog.
+// For setups that use the multi-blog feature.
+function get_users_of_blog( $id = '' ) {
+ global $wpdb, $wpmuBaseTablePrefix;
+ if ( empty($id) )
+ $id = $wpdb->blogid;
+ $users = $wpdb->get_results( "SELECT user_id, user_login, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE " . $wpdb->users . ".ID = " . $wpdb->usermeta . ".user_id AND meta_key = '" . $wpmuBaseTablePrefix . $id . "_capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
+ return $users;
+}
+
//
// User meta functions
//