Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2362

Problem with core_user_get_users_by_field

$
0
0
by Владимир Филиппов.  

Good afternoon! I really need help. I just can’t figure out why, when calling the core_user_get_users_by_field function, it gives an error:

array

(

     [exception] => invalid_parameter_exception

     [errorcode] => invalidparameter

     [message] => Invalid parameter value detected.

     [debuginfo] => Missing required key in single structure: values

)

MoodleRest.php returns this url:

https://mysite.com/webservice/rest/server.php?wstoken=xxx1&moodlewsrestformat=json&wsfunction=core_user_get_users_by_field&field=email&values[0]=email@email.com

This error also occurs when searching by id or username.

If you insert this link into the address bar of the browser, then the data is normally issued, without errors. But here one point, if I insert the email (id, username) of the user who has the right to manage the web service, then the data is normally displayed, if another user, then an empty array is returned.


Viewing all articles
Browse latest Browse all 2362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>