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

I need your help please

$
0
0
by Ulrich Eckardt.  

Hi,

I'm a "beginner" concerning API and I don't understand some things and I need your help.

1.) I've created a token in plugin webservices to use the API and it works. I can create users, I can enrol users to courses .....

2.) I've added the funktion core_user_get_users_by_field to the token

3.) I'm the owner the token and it can be used from everywhere (I have a question concening the IP-restrictions as well)

So my questions are:

1.) My Problem I want to check if a certain email address exists in moodle_users. If I use the function core_user_get_users_by_field with my email, I get all the data I want to have in an array. If I search for another existing email, I get an empty array as a result.

Works if it's my email - but not with other emails-addresses.

..... wsfunction=core_user_get_users_by_field&moodlewsrestformat=json&field=email&values[0]=info@myemail.xx
I thought, that me as an admin, I can use the token to have full access to every data and function enabled in the token. What do I do wrong?  Did I forgot smth?

2.) IP Restrictions
My Moodle and my PHP-Script are running on the same server of an internet provider. Is it possible to enter smth like localhost or 127.0.0.1 or smth else in the IP restrictions field when creating a token?

Thank you so much for your help

Greetings from Germany.

Uli



Viewing all articles
Browse latest Browse all 2361

Trending Articles



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