Error when allocating users to service groups and institutions

Bug #1438390 reported by Son Nguyen on 2015-03-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Son Nguyen

Bug Description

Version: master (15.04)
Platform, brower: any

When allocating an EMPTY username to service groups and institutions in the Web service configuration page, section "Manage service access tokens" and "Manage service users", I got

[WAR] d3 (lib/errors.php:747) Failed to get a recordset: postgres8 error: [-1: ERROR: invalid input syntax for integer: ""] in EXECUTE("SELECT * FROM "usr" WHERE "id" = ? LIMIT 2")
Command was: SELECT * FROM "usr" WHERE "id" = ? and values was ()
Call stack (most recent first):
log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /home/sonn/code/mahara/master/htdocs/lib/errors.php:97
log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /home/sonn/code/mahara/master/htdocs/lib/errors.php:747
SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /home/sonn/code/mahara/master/htdocs/lib/dml.php:480
get_recordset_sql("SELECT * FROM "usr" WHERE "id" = ? ", array(size 1), 0, 2) at /home/sonn/code/mahara/master/htdocs/lib/dml.php:314
get_record_sql("SELECT * FROM "usr" WHERE "id" = ? ", array(size 1)) at /home/sonn/code/mahara/master/htdocs/lib/dml.php:291
get_record("usr", "id", "") at /home/sonn/code/mahara/master/htdocs/webservice/admin/index.php:212
webservices_user_submit(object(Pieform), array(size 4)) at Unknown:0
call_user_func_array("webservices_user_submit", array(size 2)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:532
Pieform->__construct(array(size 6)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:162
Pieform::process(array(size 6)) at /home/sonn/code/mahara/master/htdocs/lib/pieforms/pieform.php:71
pieform(array(size 6)) at /home/sonn/code/mahara/master/htdocs/webservice/admin/index.php:937
service_users_edit_form() at /home/sonn/code/mahara/master/htdocs/webservice/admin/index.php:1074
get_config_options_extended() at /home/sonn/code/mahara/master/htdocs/webservice/admin/index.php:27

Reviewed: https://reviews.mahara.org/4528
Committed: http://gitorious.org/mahara/mahara/commit/5686c1137b0b11f8b4dc09bcf9cc1a82da9da42a
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 5686c1137b0b11f8b4dc09bcf9cc1a82da9da42a
Author: Son Nguyen <email address hidden>
Date: Tue Mar 31 09:03:16 2015 +1300

Fix error when adding an empty username. Bug 1438390

One should not be allowed to add an empty user to service access tokens
and/or service users in Web services admin section

Change-Id: I8d78a9400c08d9434387d66a273eadb846479cc2

Robert Lyon (robertl-9) on 2015-03-30
Changed in mahara:
milestone: none → 15.04.0
status: New → Fix Committed

Reviewed: https://reviews.mahara.org/4531
Committed: http://gitorious.org/mahara/mahara/commit/2f4cb76b62fac35d29cbc51504b048a24e894c77
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 2f4cb76b62fac35d29cbc51504b048a24e894c77
Author: Son Nguyen <email address hidden>
Date: Tue Mar 31 09:03:16 2015 +1300

Fix error when adding an empty username. Bug 1438390

One should not be allowed to add an empty user to service access tokens
and/or service users in Web services admin section

Change-Id: I8d78a9400c08d9434387d66a273eadb846479cc2

Robert Lyon (robertl-9) on 2015-04-17
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