I could really use some help on an issue I'm having with SOAP WebServices and PHP.
I wrote down a script that's capable of registering a member via the "registerMember" function, and according to the wiki, I'm trying to include some member custom fields in the process.
There's absolutely no trouble on registering a member: the whole thing go well, but it seems there's no way for me to get custom fields on registration working.
I'm sending the parameters of the function like this:
$params = new stdclass();
$params->groupId = "33";
$params->name = "Name";
$params->email = "firstname.lastname@example.org";
$params->loginPassword = "secret";
$params->fields = $myfieldsarray;
The problem seems to be on the definition of $fieldsarray, wich I tried to declare this way:
$myfieldsarray = array('internalName' => 'vbfirstnamec', 'fieldId' => '91', 'displayName' => 'NomeC', 'value' => 'Andrea', 'possibleValueId' => NULL, 'hidden' => false);
I don't get any error, the registration seems to work just fine, but when I go to the member profile, the custom field just doesn't have any value.
After searching this forum I even tried this form for the array $myfieldsarray:
$myfieldsarray = array('field' => 'vbfirstnamec', 'value' => 'Andrea', 'hidden' => false);
cause in a thread I found someone sayin that was the way to pass parameters to the function, but in this case i get this error:
wich is why I suppose the right method to declare the custom field is the first one, according to the Wiki, also, it says you must pass a list (list? Is that intended like an actual list or an array parsed through the "list()" function?) of "registrationFieldValues", wich the model data explains to be like:SoapFault exception: [ns1:invalid-parameter] Couldn't find custom field for this field: FieldValueVO [internalName=null, fieldId=null, displayName=null, value=Andrea, possibleValueId=null]
internalName (string): The custom field internal name
fieldId (number): The custom field id
displayName (string): The custom field display name
value (any): The custom field value
possibleValueId (number): The custom field possible value id
hidden (boolean): Indicates whether the given field is hidden from others
and that is what I'm sending on the first case, but it just seems to ignore my custom fields, register the user, send me back what supposed to, and when I go to the profile, the member is registered, the group and the parameters are right, but in any case, there isn't any custom field actually filled.
Any help? Any example I could use to see how a working registration with Custom Fields used is to be written?
I'm using Cyclos 3.7.1
Thanks in advance