function profile_load_profile in Drupal 4
Same name and namespace in other branches
- 5 modules/profile/profile.module \profile_load_profile()
- 6 modules/profile/profile.module \profile_load_profile()
2 calls to profile_load_profile()
- profile_user in modules/
profile.module - Implementation of hook_user().
- profile_view_profile in modules/
profile.module
File
- modules/
profile.module, line 493 - Support for configurable user profiles.
Code
function profile_load_profile(&$user) {
$result = db_query('SELECT f.name, f.type, v.value FROM {profile_fields} f INNER JOIN {profile_values} v ON f.fid = v.fid WHERE uid = %d', $user->uid);
while ($field = db_fetch_object($result)) {
if (empty($user->{$field->name})) {
$user->{$field->name} = _profile_field_serialize($field->type) ? unserialize($field->value) : $field->value;
}
}
}