Return all messages for core_message_get_messages() Web Services function if useridto = 0, useridfrom = 0 and user has "moodle/site:readallmessages" capability.
- Set up webservices for core_message_get_messages() with "moodle/site:readallmessages" capability
- Call core_message_get_messages() with useridto = 0 and useridfrom = 0
As described in
MDL-45374, leaving sender and receiver empty will return empty data.
Wouldn't it be better if core_message_get_messages could return all the messages instead if no sender and receiver are specified?