Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

MDL-31431 webservices: improve user pic docs

Explain how to retrieve profile picture when forcelogin is set to NO and guestaccess to Yes
  • Loading branch information...
commit 6d8e40a429855b239c2c09113a7111b0823ec95d 1 parent 2bda67f
@mouneyrac mouneyrac authored danpoltawski committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 webservice/externallib.php
6 webservice/externallib.php
@@ -151,7 +151,11 @@ public static function get_site_info_returns() {
'fullname' => new external_value(PARAM_TEXT, 'user full name'),
'userid' => new external_value(PARAM_INT, 'user id'),
'siteurl' => new external_value(PARAM_RAW, 'site url'),
- 'userpictureurl' => new external_value(PARAM_URL, 'the user profile picture'),
+ 'userpictureurl' => new external_value(PARAM_URL, 'the user profile picture.
+ Warning: this url is the public URL that only works when forcelogin is set to NO and guestaccess is set to YES.
+ In order to retrieve user profile pictures independently of the Moodle config, replace "pluginfile.php" by
+ "webservice/pluginfile.php?token=WSTOKEN&file=". Of course the user can only see profile picture depending on his/her permissions.
+ Moreover it is recommended to use HTTPS too.'),
'functions' => new external_multiple_structure(
new external_single_structure(
Please sign in to comment.
Something went wrong with that request. Please try again.