function profile_save_profile
Same name and namespace in other branches
- 7.x drupal-7.x/modules/profile/profile.module \profile_save_profile()
1 call to profile_save_profile()
- profile_user in drupal-6.x/modules/profile/profile.module
- Implementation of hook_user().
Archivo
- drupal-6.x/modules/profile/profile.module, line 236
- Support for configurable user profiles.
Código
function profile_save_profile(&$edit, &$user, $category, $register = FALSE) {
$result = _profile_get_fields($category, $register);
while ($field = db_fetch_object($result)) {
if (_profile_field_serialize($field->type)) {
$edit[$field->name] = serialize($edit[$field->name]);
}
db_query("DELETE FROM {profile_values} WHERE fid = %d AND uid = %d", $field->fid, $user->uid);
db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", $field->fid, $user->uid, $edit[$field->name]);
$edit[$field->name] = NULL;
}
}