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.

Parameters

$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

user_load_multiple()

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/cis_helper.pages.inc
Submit handler for cis_helper_offering_planning_page.
cis_helper_quick_setup_page_submit in profiles/cis/modules/custom/cis_helper/cis_helper.pages.inc
Implements hook_submit().

... See full list

File

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

Code

function user_load($uid, $reset = FALSE) {
  $users = user_load_multiple(array($uid), array(), $reset);
  return reset($users);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.