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

User can not upload profile image, but admin can...

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.9.3
    • None
    • User management
    • None
    • MOODLE_29_STABLE

    Description

      Admin account can upload user profile image, but when regular user try to upload image on his profile he gets this error message:

      Debug info: ERROR: value too long for type character varying(2)
      UPDATE mdl_user SET firstname = $1,lastname = $2,email = $3,maildisplay = $4,city = $5,country = $6,timezone = $7,theme = $8,imagealt = $9,firstnamephonetic = $10,lastnamephonetic = $11,middlename = $12,alternatename = $13,url = $14,icq = $15,skype = $16,aim = $17,yahoo = $18,msn = $19,idnumber = $20,institution = $21,department = $22,phone1 = $23,phone2 = $24,address = $25,timemodified = $26,description = $27,descriptionformat = $28 WHERE id=$29
      [array (
      'firstname' => XXXXX',
      'lastname' => 'XXXXX',
      'email' => 'XXXXX',
      'maildisplay' => '2',
      'city' => 'XXXXX',
      'country' =>
      array (
      0 => 'XXXXX',
      ),
      'timezone' => 'XXXXX',
      'theme' => '',
      'imagealt' => '',
      'firstnamephonetic' => '',
      'lastnamephonetic' => '',
      'middlename' => '',
      'alternatename' => '',
      'url' => '',
      'icq' => '',
      'skype' => '',
      'aim' => '',
      'yahoo' => '',
      'msn' => '',
      'idnumber' => '',
      'institution' => 'XXXXX',
      'department' => '',
      'phone1' => '',
      'phone2' => '',
      'address' => '',
      'timemodified' => 1448070462,
      'description' => '',
      'descriptionformat' => '1',
      0 => 110963,
      )]
      Error code: dmlwriteexception

      Stack trace:

      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 1131 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1171 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->update_record_raw()
      line 173 of /user/lib.php: call to pgsql_native_moodle_database->update_record()
      line 230 of /user/edit.php: call to user_update_user()

      ----------------------------

      Moodle 2.9.3 (Build: 20151113)
      Postgres 9.3.10
      PHP 5.5.9.1.4.14
      Ubuntu

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              caiado Ricardo Caiado
              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: