function profile_save_profile

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/profile/profile.module \profile_save_profile()
2 calls to profile_save_profile()
profile_user_insert in drupal-7.x/modules/profile/profile.module
Implements hook_user_insert().
profile_user_presave in drupal-7.x/modules/profile/profile.module
Implements hook_user_presave().

Archivo

drupal-7.x/modules/profile/profile.module, line 262
Support for configurable user profiles.

Código

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