On this page
function profile_save_profile
profile_save_profile(&$edit, $account, $category, $register = FALSE)
File
- modules/profile/profile.module, line 262
- Support for configurable user profiles.
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();
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!profile!profile.module/function/profile_save_profile/7.x