- Posts: 6
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
public function get_participant_properties($sSessionKey, $iSurveyID, $iTokenID, $aTokenProperties)
$result = array_intersect_key($token->attributes, array_flip($aTokenProperties));
Note that the values of array need to be valid keys, i.e. they need to be either integer or string. A warning will be emitted if a value has the wrong type, and the key/value pair in question will not be included in the result.
That doesn't explain why you have an error 500.
I suggest you do some test on the method, maybe you'll find a bug.
Feel free to submit PR to our Git Repository.
"{\"method\": \"set_participant_properties\", \"params\": {\"sSessionKey \": \"{0}\", \"iSurveyID \": \"{1}\", \"aTokenQueryProperties\": {\"token\": \"{2}\"}, \"aTokenData \": {\"sent\": \"Y\"}}, \"id\": \"1\"}"
$tokenCount = Token::model($iSurveyID)->countByAttributes($aTokenQueryProperties); if($tokenCount == 0){ return array('status' => 'Error: No results were found based on your attributes.'); }else if($tokenCount > 1){ return array('status' => 'Error: More than 1 result was found based on your attributes.'); }