Error when moving users into instution

Bug #1319601 reported by Robert Lyon on 2014-05-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Robert Lyon

Bug Description

Bug in latest master:

When one tries to add users to an institution in admin/users/institutionusers.php it throws an error.

The is due to a bug in how the userid is gotten from updateuser $eventdata

Need to get the id as a string from the array containing id.

[WAR] cd (lib/adodb/ Array to string conversion
Call stack (most recent first):

    log_message("Array to string conversion", 8, true, true, "/home/bob/work/mahara/htdocs/lib/adodb/", 1019) at /home/bob/work/mahara/htdocs/lib/errors.php:433
    error(8, "Array to string conversion", "/home/bob/work/mahara/htdocs/lib/adodb/", 1019, array(size 10)) at /home/bob/work/mahara/htdocs/lib/adodb/
    ADOConnection->Execute("SELECT *, IF(expiry >= '1970-01-01', UNIX_TIMESTAM...", array(size 1)) at /home/bob/work/mahara/htdocs/lib/adodb/drivers/
    ADODB_mysqli->SelectLimit("SELECT *, IF(expiry >= '1970-01-01', UNIX_TIMESTAM...", 2, -1, array(size 1)) at /home/bob/work/mahara/htdocs/lib/dml.php:458
    get_recordset_sql("SELECT *, IF(expiry >= '1970-01-01', UNIX_TIMESTAM...", array(size 1), 0, 2) at /home/bob/work/mahara/htdocs/lib/dml.php:311
    get_record_sql("SELECT *, IF(expiry >= '1970-01-01', UNIX_TIMESTAM...", array(size 1)) at /home/bob/work/mahara/htdocs/lib/dml.php:288
    get_record("usr", "id", array(size 1), null, null, null, null, "*, IF(expiry >= '1970-01-01', UNIX_TIMESTAMP(expir...") at /home/bob/work/mahara/htdocs/lib/user.php:1195
    get_user(array(size 1)) at /home/bob/work/mahara/htdocs/artefact/file/lib.php:449
    PluginArtefactFile::eventlistener_savedeleteartefact("updateuser", array(size 1)) at Unknown:0
    call_user_func_array(array(size 2), array(size 2)) at /home/bob/work/mahara/htdocs/lib/mahara.php:1562
    call_static_method("PluginArtefactFile", "eventlistener_savedeleteartefact", "updateuser", array(size 1)) at /home/bob/work/mahara/htdocs/lib/mahara.php:1695
    handle_event("updateuser", "2") at /home/bob/work/mahara/htdocs/lib/institution.php:338

Robert Lyon (robertl-9) on 2014-05-15
Changed in mahara:
milestone: none → 1.10.0

Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 69401617556259d649aac9bcb0a82b4fc3beca01
Author: Robert Lyon <email address hidden>
Date: Thu May 15 12:04:36 2014 +1200

Allowing users to be updated if passed in as array (Bug #1319601)

Currently when updateuser event fires it expects the userid to be
passed in as a string - needed to get string from array if array is

Change-Id: I0787c1666bd5e0d82f86e14f9cb57535494b85d1
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw) on 2014-10-21
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers