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

Allow user profile picture update in webservices (user_update_users)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2
    • 2.9.2, 3.2
    • User management
    • MOODLE_29_STABLE, MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • Hide

      Unit tests additions confirm that a user picture is set in the database.

      1. Ensure webservices is enabled (Site Administration > Advanced features), select "Enable Webservices".
      2. Setup a webservices in Moodle (Site Administration > Plugins > Webservices > External Service), ensure "can upload files" is selected.
      3. Turn on the json protocol (Site Administration > Plugins > Webservices > Manage protocols)
      4. Create a token (Site Administration > Plugins > Webservices > Manage protocols)
      5. Clone git@github.com:mr-russ/sample-ws-clients.git
      6. cd sample-ws-clients/PHP-REST
      7. Update client.php with your moodle url and token.
      8. Run php client.php
      9. Load moodle and check the Admin user profile now has the moodle icon as their profile picture.
      Show
      Unit tests additions confirm that a user picture is set in the database. Ensure webservices is enabled (Site Administration > Advanced features), select "Enable Webservices". Setup a webservices in Moodle (Site Administration > Plugins > Webservices > External Service), ensure "can upload files" is selected. Turn on the json protocol (Site Administration > Plugins > Webservices > Manage protocols) Create a token (Site Administration > Plugins > Webservices > Manage protocols) Clone git@github.com:mr-russ/sample-ws-clients.git cd sample-ws-clients/PHP-REST Update client.php with your moodle url and token. Run php client.php Load moodle and check the Admin user profile now has the moodle icon as their profile picture.

      When updating a user via webservices, there is no option available to submit a profile picture.

      You should be able to submit a profile picture to the webservice and it will update the user picture.

            mr-russ Russell Smith
            mr-russ Russell Smith
            Adrian Greeve Adrian Greeve
            Andrew Lyons Andrew Lyons
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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