If you add a local plugin that adds two admin users, the install fails with 'error reading from database' when redirecting to admin user edit page.
Stack trace looks like this:
2012-02-29 14:39:52: (mod_fastcgi.c.2699) FastCGI-stderr: Default exception handler: Error reading from database Debug: ERROR: invalid input syntax for integer: "2,3"
|
SELECT * FROM mdl_user WHERE id = $1 AND deleted <> 1
|
[array (
|
0 => '2,3',
|
)]
|
* line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
* line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
|
* line 678 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
|
* line 1297 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
|
* line 1269 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
|
* line 4125 of /lib/moodlelib.php: call to moodle_database->get_record_select()
|
* line 301 of /admin/index.php: call to get_complete_user_data()
|
This occurs because it is assumed that there is only one admin at this stage and can be fixed with a small patch (github incoming).
Applying this change will allow custom plugins to add admin users on install, which can be useful for any partners automating installation processes.