function profile_user_load

Implements hook_user_load().

File

modules/profile/profile.module, line 253

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;
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.