Hi, I'm successfully using the REST API to create users and enrol them on existing courses.
However, I'm unable to find a call that checks to see if the user already exists on the Moodle setup. When I try to add a user that already exists, the response is more like an error message and doesn't return any indication that the user is there or not. It's only by testing and elimination that I've established what is happening!
I've created a workaround using a separate database to store user info (not at all ideal from many perspectives) using calls to retrieve users that are already enrolled in courses, but that doesn't work if a user is registered on Moodle but not enrolled on any course.
Can anyone suggest please either a call to the API that will retrieve user details of an unenrolled user or a way of just retrieving their UID?
I'm sure the function is out there somewhere and I'm just being stupid...
Many thanks for your time!