Web service that returns current user's profile

Web service that returns current user's profile

av Stuart Blake -
Antall svar: 1

I hope this is the right place to put it.

I'm essentially needing to create a web service that returns the current user's profile information, specifically, their email address. The request happens from an external service, hence the web service requirement.

My thought is to use it to basically ask the question "Hey Moodle, who is currently logged into you? Are they authenticated?" If yes, get email address. If not, then return something and handle it appropriately. I'm basically wanting this to function as a poor man's way of checking on another webpage what user to submit a form as. This can all be handled on that server via PHP, so I'm not thinking it presents any sort of a security concern.

I've had a really good look at the current web services, but I cannot see anything that fits what I'm looking for, but surely such a thing exists? It seems like they have every webservice available possible except to just see who is logged in.

Possible / not possible?

Any help appreciated.

Gjennomsnittlig vurdering: -
Som svar til Stuart Blake

Re: Web service that returns current user's profile

av Darko Miletić -

You would have to write this since it does not exist in core Moodle. If you have doubts on how to proceed ask here.