function user_uid_optional_load
Same name and namespace in other branches
- 7.x drupal-7.x/modules/user/user.module \user_uid_optional_load()
Load either a specified or the current user account.
Parameters
$uid: An optional user ID of the user to load. If not provided, the current user's ID will be used.
Return value
A fully-loaded $user object upon successful user load, FALSE if user cannot be loaded.
See also
Archivo
- drupal-6.x/
modules/ user/ user.module, line 1170 - Enables the user registration and login system.
Código
function user_uid_optional_load($uid = NULL) {
if (!isset($uid)) {
$uid = $GLOBALS['user']->uid;
}
return user_load($uid);
}