Changeset 15540 for trunk/wp-admin/includes/user.php
- Timestamp:
- 08/27/2010 12:22:29 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/user.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r15539 r15540 196 196 * @since unknown 197 197 * 198 * @return array List of user IDs.199 */200 function get_author_user_ids() {201 global $wpdb;202 if ( !is_multisite() )203 $level_key = $wpdb->get_blog_prefix() . 'user_level';204 else205 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels206 207 return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );208 }209 210 /**211 * {@internal Missing Short Description}}212 *213 * {@internal Missing Long Description}}214 *215 * @since unknown216 *217 * @param int $user_id User ID.218 * @return array|bool List of editable authors. False if no editable users.219 */220 function get_editable_authors( $user_id ) {221 global $wpdb;222 223 $editable = get_editable_user_ids( $user_id );224 225 if ( !$editable ) {226 return false;227 } else {228 $editable = join(',', $editable);229 $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );230 }231 232 return apply_filters('get_editable_authors', $authors);233 }234 235 /**236 * {@internal Missing Short Description}}237 *238 * {@internal Missing Long Description}}239 *240 * @since unknown241 *242 198 * @param int $user_id User ID. 243 199 * @param bool $deprecated Not used.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)