function hook_profile2_insert in Profile 2 7.2
Same name and namespace in other branches
- 7 profile2.api.php \hook_profile2_insert()
Respond when a profile is inserted.
This hook is invoked after the profile is inserted into the database.
Parameters
profile: The profile that is being inserted.
See also
File
- ./
profile2.api.php, line 43 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_profile2_insert($profile) {
db_insert('mytable')
->fields(array(
'pid' => $profile->pid,
'extra' => $profile->extra,
))
->execute();
}