Details
-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.9
-
None
-
MOODLE_29_STABLE
-
-
- Call get_enrolled_users webservice with a user that is not siteadmin, asking for username, and see that username is not returned.
- Apply the patch, call the webservice again and see the username field is returned
Description
A restriction was added to user_get_user_details
during the development of MDL-27976 ,
that makes it return the username only if the user requesting
is a siteadmin or if the user requesting is the same as the user requested.
As this function is used by the webservices such as
get_enrolled_users_with_capability and get_enrolled_users,
it is at leat annoying.
The workaround is to made the webservice user a site admin.