function profile_user_load
7.x profile.module | profile_user_load($users) |
Implements hook_user_load().
File
- drupal-7.x/
modules/ profile/ profile.module, line 253 - Support for configurable user profiles.
Code
function profile_user_load($users) {
$result = db_query('SELECT f.name, f.type, v.uid, v.value FROM {profile_field} f INNER JOIN {profile_value} v ON f.fid = v.fid WHERE uid IN (:uids)', array(':uids' => array_keys($users)));
foreach ($result as $record) {
if (empty($users[$record->uid]->{$record->name})) {
$users[$record->uid]->{$record->name} = _profile_field_serialize($record->type) ? unserialize($record->value) : $record->value;
}
}
}