user_load_multiple

Versions
7
user_load_multiple($uids = array(), $conditions = array(), $reset = FALSE)

Load multiple users based on certain conditions.

This function should be used whenever you need to load more than one user from the database. Users are loaded into memory and will not require database access if loaded again during the same page request.

See also

entity_load()

@see user_load()

See also

user_load_by_mail()

@see user_load_by_name()

Parameters

$uids An array of user IDs.

$conditions An array of conditions to match against the {users} table. These should be supplied in the form array('field_name' => 'field_value').

$reset A boolean indicating that the internal cache should be reset. Use this if loading a user object which has been altered during the page request.

Return value

An array of user objects, indexed by uid.

▾ 9 functions call user_load_multiple()

profile_browse in modules/profile/profile.pages.inc
Menu callback; display a list of user information.
user_load in modules/user/user.module
Fetch a user object.
user_load_by_mail in modules/user/user.module
Fetch a user object by email address.
user_load_by_name in modules/user/user.module
Fetch a user object by account name.
user_multiple_role_edit in modules/user/user.module
Callback function for admin mass adding/deleting a user role.
user_pass_reset in modules/user/user.pages.inc
Menu callback; process one time login link and redirects to the user page on success.
user_pass_validate in modules/user/user.pages.inc
user_user_operations_block in modules/user/user.module
Callback function for admin mass blocking users.
user_user_operations_unblock in modules/user/user.module
Callback function for admin mass unblocking users.

Code

modules/user/user.module, line 182

<?php
function user_load_multiple($uids = array(), $conditions = array(), $reset = FALSE) {
  return entity_load('user', $uids, $conditions, $reset);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.