mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 10:11:49 +01:00
ParticipantService - getParticipantDetails() method - returns full data of participant with given e-mail of given survey
This commit is contained in:
@@ -179,7 +179,7 @@ class ParticipantService
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns participant with given e-mail of given survey
|
||||
* Returns short data of one participant with given e-mail of given survey
|
||||
*
|
||||
* @param int $surveyId ID of survey
|
||||
* @param string $email E-mail address of the participant
|
||||
@@ -197,6 +197,31 @@ class ParticipantService
|
||||
->getParticipantOfSurvey($surveyId, $email);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns full data of participant with given e-mail of given survey
|
||||
*
|
||||
* @param int $surveyId ID of survey
|
||||
* @param string $email E-mail address of the participant
|
||||
* @return Participant|null
|
||||
*/
|
||||
public function getParticipantDetails($surveyId, $email)
|
||||
{
|
||||
$arguments = [
|
||||
$surveyId,
|
||||
[
|
||||
'email' => $email,
|
||||
],
|
||||
];
|
||||
|
||||
$participant = $this
|
||||
->client
|
||||
->run(MethodType::GET_PARTICIPANT_PROPERTIES, $arguments)
|
||||
->getData();
|
||||
|
||||
/* @var Participant $participant */
|
||||
return $participant;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information if participant with given e-mail has filled given survey
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user