Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31431

Profile image sometimes requires login => mobile app can not retrieve profile images

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • Hide

      At the moment core_webservice_get_site_info() returns:

      <KEY name="userpictureurl"><VALUE>http://jerome.moodle.local/~jerome/Moodle_HEAD/pluginfile.php/5/user/icon/f1</VALUE>
      </KEY>

      to avoid this MDL issue with forcelogin/guestaccess, you can call the picture this way:

      http://jerome.moodle.local/~jerome/Moodle_HEAD/webservice/pluginfile.php?token= f95fe8ce5f6a4f01dc22ccdf333bba22&file=/5/user/icon/f1

      Show
      At the moment core_webservice_get_site_info() returns: <KEY name="userpictureurl"><VALUE>http://jerome.moodle.local/~jerome/Moodle_HEAD/pluginfile.php/5/user/icon/f1</VALUE> </KEY> to avoid this MDL issue with forcelogin/guestaccess, you can call the picture this way: http://jerome.moodle.local/~jerome/Moodle_HEAD/webservice/pluginfile.php?token= f95fe8ce5f6a4f01dc22ccdf333bba22&file=/5/user/icon/f1
    • Hide

      Go to Plugins > Web services > API Documentation
      Check that core_webservice_get_site_info:userpictureurl return value explain how to retrieve the profile picture when forcelogin is set to YES or guestaccess to NO.

      Show
      Go to Plugins > Web services > API Documentation Check that core_webservice_get_site_info:userpictureurl return value explain how to retrieve the profile picture when forcelogin is set to YES or guestaccess to NO.

      Juan wrote in the web service forum:

      The current webservices for displaying information about an user returns a value called:

      user.profileimageurl

      This is the full url of the user profile image

      Please, note that the current implementation only works if forcelogin is set to NO and guestaccess to Yes

      Also, there is a new security issue for preventing displaying profile images for guests users

      http://tracker.moodle.org/browse/MDL-29844

      I think it's neccesary a new script for obtaining this image using the auth token as a parmether (like the new pluginfile)

            jerome Jérôme Mouneyrac
            jerome Jérôme Mouneyrac
            Juan Leyva Juan Leyva
            Dan Poltawski Dan Poltawski
            Ankit Agarwal Ankit Agarwal
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.