function user_load

cis7 user.module user_load($uid, $reset = FALSE)
cle7 user.module user_load($uid, $reset = FALSE)
elmsmedia7 user.module user_load($uid, $reset = FALSE)
icor7 user.module user_load($uid, $reset = FALSE)
meedjum_blog7 user.module user_load($uid, $reset = FALSE)
mooc7 user.module user_load($uid, $reset = FALSE)

Loads a user object.

Drupal has a global $user object, which represents the currently-logged-in user. So to avoid confusion and to avoid clobbering the global $user object, it is a good idea to assign the result of this function to a different local variable, generally $account. If you actually do want to act as the user you are loading, it is essential to call drupal_save_session(FALSE); first. See Safely impersonating another user for more information.


$uid: Integer specifying the user ID to load.

$reset: TRUE to reset the internal cache and load from the database; FALSE (default) to load from the internal cache, if set.

Return value

A fully-loaded user object upon successful user load, or FALSE if the user cannot be loaded.

See also


101 calls to user_load()
boost_boost_menu_router in sites/all/modules/ulmus/boost/boost.module
Implements hook_boost_menu_router().
cis_example_cis_service_set_cis_service_data in sites/all/modules/_my_modules/cis_examples/cis_example_cis_service/cis_example_cis_service.module
Implements hook_set_cis_service_data().
cis_helper_cron in profiles/cis/modules/custom/cis_helper/cis_helper.module
Implements hook_cron().
cis_helper_offering_planning_page_submit in profiles/cis/modules/custom/cis_helper/
Submit handler for cis_helper_offering_planning_page.
cis_helper_quick_setup_page_submit in profiles/cis/modules/custom/cis_helper/
Implements hook_submit().

... See full list


modules/user/user.module, line 365
Enables the user registration and login system.


function user_load($uid, $reset = FALSE) {
  $users = user_load_multiple(array($uid), array(), $reset);
  return reset($users);