function messaging_load_user in Messaging 6
Same name and namespace in other branches
- 5 messaging.module \messaging_load_user()
- 6.4 messaging.module \messaging_load_user()
- 6.2 messaging.module \messaging_load_user()
- 6.3 messaging.module \messaging_load_user()
Helper user loading function with static caching
3 calls to messaging_load_user()
- messaging_privatemsg_send_msg in messaging_privatemsg/
messaging_privatemsg.module - Send mail message to user accounts
- messaging_store_unpack in ./
messaging.store.inc - Unpack stored messages
- messaging_token_values in ./
messaging.module - Implementation of hook_token_values()
File
- ./
messaging.module, line 778
Code
function messaging_load_user($uid) {
static $cache = array();
if (!array_key_exists($uid, $cache)) {
$cache[$uid] = user_load(array(
'uid' => $uid,
));
}
return $cache[$uid];
}