by Jesse Kuschel.
Hello - I'm encountering an error regarding web services and I'm not sure if I'm missing something or if what I want to do is not allowed. I have created a new web service with a few of the functions from core_users. I'm access that service via REST successfully, and I can create users, delete users, and search for users. This tells me my token authentication and data formats are correct. My final goal is to be able to update the "auth" method for another user via Web Services using the "core_user_set_user_preferences" function.
When I make a call to this service, the response back Warning Code is "nopermission" and the message states "You are not allowed to change the preference auth for user 12". I am able to log into the Moodle web interface with this same web service account and modify the auth preference for user 12.
The contents of my POST request is "preferences[0][name]=auth&preferences[0][value]=manual&preferences[0][userid]=12".
Is this something I cannot do through web services? My ultimate goal here is to be able to disable login (setting auth to "nologin") from a 3rd-party system via REST.
Thank you for assistance.