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...
mouneyrac authored and danpoltawski committed Apr 16, 2012
1 parent f488088 commit e1f9702056c0bdaf7e65a77f74ac729b2f500b3b
Showing with 5 additions and 1 deletion.
  1. +5 −1 webservice/externallib.php
@@ -164,7 +164,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(

0 comments on commit e1f9702

Please sign in to comment.