Skip to content

Commit

Permalink
Add secret key param to WSSearchSession - refs BT#9418
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Feb 25, 2015
1 parent a743554 commit ab68ea0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main/webservices/registration.soap.php
Expand Up @@ -5557,7 +5557,8 @@ function WSUserSubscribedInCourse ($params)
'',
array(
'term' => array('name' => 'term', 'type' => 'xsd:string'),
'extrafields' => array('name' => 'extrafields', 'type' => 'xsd:string')
'extrafields' => array('name' => 'extrafields', 'type' => 'xsd:string'),
'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string')
)
);

Expand Down Expand Up @@ -5634,10 +5635,15 @@ function WSUserSubscribedInCourse ($params)
* Web service to get a session list filtered by name, description or short description extra field
* @param string Secret key
* @param string $extraFields Extrafields to include in request result
* @param string $secretKey Secret key to check
* @return array The list
*/
function WSSearchSession($term, $extraFields)
function WSSearchSession($term, $extraFields, $secretKey)
{
if (!WSHelperVerifyKey($secretKey)) {
return return_error(WS_ERROR_SECRET_KEY);
}

$fieldsToInclude = explode(',', $extraFields);

foreach ($fieldsToInclude as &$field) {
Expand Down

0 comments on commit ab68ea0

Please sign in to comment.