I am using profile object inside
function hook_civicrm_post($op, $objectName, $objectId, &$objectRef){
}
How can I fetch the Profile gid from the above variables? or is there any way to implement it ?
I want to create a household on submission of a Profile A using custom fields and similarly create an Organization on submission of a Profile B using custom fields.
So I need a Profile ID which will distinguish between Profile A and Profile B using gid.
The $objectRef variable has the following structure for Profile
Array
(
[qfKey] => f6a85f995860db13425c24378f05c98d_9488
[entryURL] => https://example.com/example-registration/?page=CiviCRM&q=civicrm/contribute/transact&
[email-Primary] => [email protected]
[first_name] => check
[last_name] => gmail
[phone-Primary-1] =>
[street_address-Primary] => abc
[supplemental_address_1-Primary] => a
[city-Primary] => cci
[postal_code-Primary] => 30200
[country-Primary] => 1013
[state_province-Primary] => 1640
[1] => 1
[2] =>
[3] =>
[4] =>
[custom_16] => Array
(
[1] => 1
[2] =>
[3] =>
[4] =>
)
[custom_17] =>
[5] =>
[custom_1] => Array
(
[1] => 1
[2] =>
[3] =>
[4] =>
[5] =>
)
[custom_18] =>
[custom_19] => Partner check
[payment_processor_id] => 0
[priceSetId] => 8
[price_12] => 40
[selectProduct] =>
[cms_create_account] => 1
[cms_name] => familycheck
[cms_pass] => test
[cms_confirm_pass] => test
[MAX_FILE_SIZE] => 20971520
[ip_address] => 192.51.248.26
[amount] => 65
[amount_level] =>
[selectMembership] => 2
[tax_amount] =>
[currencyID] => AUD
[is_pay_later] => 1
[invoiceID] => 0c6d15e48854236861cdc16a4a8222e9
[is_quick_config] => 1
[email-5] => [email protected]
[description] => Online Contribution: Family Registration
[accountingCode] =>
[addressee] => 1
[email_greeting] => 1
[postal_greeting] => 1
[updateBlankLocInfo] =>
)