core_user_get_users_by_field error: Calling parameters do not match signature (PHP - XML RPC)

core_user_get_users_by_field error: Calling parameters do not match signature (PHP - XML RPC)

by Francois J -
Number of replies: 0

Hi,

I was wondering if someone could kindly help me with the core_user_get_users_by_field web service function.

After various intents, I stumble upon this error: "Calling parameters do not match signature".

The web service is consumed using PHP & XML RPC, here is an example variable sent to Moodle:

$users = array(
    array(
        'field' => 'email',
        'values' => array( 'foo@bar.com' ),
    ),
);

return array( $users );

Or, getting the same error using:

$users = array(
   'field' => 'email',
   'values' => array( 'foo@bar.com' ),
);

return array( $users );

A general context of how the code is sent can be found in the RosarioSIS' Moodle plugin:

XMLRPC call:

https://github.com/francoisjacquet/rosariosis/blob/mobile/plugins/Moodle/client.php#L20

Working call for core_user_create_users function:

https://github.com/francoisjacquet/rosariosis/blob/mobile/plugins/Moodle/Users/User.php#L5


Thanks,

François

Average of ratings: -