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

create_user web service does not return the user id

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Web Services
    • Labels:
      None

      Description

      The create_user() function in /user/externallib.php does not return the user id after creating the user. This is because the user id is accessed as if $user were an object, but it should be accessed as an array element instead. The affected line is:

      $userids[] = array('id'=>$user->id, 'username'=>$user['username']);

        Attachments

          Activity

            People

            Assignee:
            jerome Jérôme Mouneyrac
            Reporter:
            bazzymg Basil Gohar
            Tester:
            Nobody
            Participants:
            Component watchers:
            Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10