api profile.submit does not add contact to group specified by the profile
This was raised in the contact of remoteform. I suspect it doesn't trigger the email notification either and perhaps other things that it should do.
I think that's because the api method calls
civicrm_api3('contact', 'create', $profileParams); to create the contact specified, rather than
CRM_Contact_BAO_Contact::createProfileContact which seems to happen when a profile is submitted via the normal web usage.
Any opinions on what to do? I think our options are:
- Do nothing. The profile.submit api action could remain a simple action to just get the data in and I could write a wrapper in remoteform and handle the other pieces
- Keep profile.submit the same, but tack on some addtional code that tries to handle the extra steps that need to be taken when a profile is submitted.
- Fix profile.submit to use
CRM_Contact_BAO_Contact::createProfileContactinstead of contact.create
I suspect the last option is the best option, but curious to get feedback before I start.