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

Allow user profile picture update in webservices (user_update_users)

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.2, 3.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.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              mr-russ Russell Smith
              mr-russ Russell Smith
              Adrian Greeve Adrian Greeve
              Andrew Lyons Andrew Lyons
              Jake Dallimore Jake Dallimore
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16