function profile_save_profile
2 calls to profile_save_profile()
- profile_user_insert in modules/
profile/ profile.module - Implements hook_user_insert().
- profile_user_presave in modules/
profile/ profile.module - Implements hook_user_presave().
File
-
modules/
profile/ profile.module, line 262
Code
function profile_save_profile(&$edit, $account, $category, $register = FALSE) {
$result = _profile_get_fields($category, $register);
foreach ($result as $field) {
if (_profile_field_serialize($field->type)) {
$edit[$field->name] = serialize($edit[$field->name]);
}
db_merge('profile_value')->key(array(
'fid' => $field->fid,
'uid' => $account->uid,
))
->fields(array(
'value' => $edit[$field->name],
))
->execute();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.