From 1772c721508968a315a7cf4e1d4dcfe3fd7a5a8e Mon Sep 17 00:00:00 2001 From: Nigel McNie Date: Sat, 17 Nov 2007 13:22:02 +1300 Subject: [PATCH] A couple of MySQL installation issue fixes: * Make sure that the root user has their authinstance ID set correctly. * Make sure that the root user is forced to have ID 0 --- htdocs/lib/upgrade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/upgrade.php b/htdocs/lib/upgrade.php index 4325f964..238de224 100644 --- a/htdocs/lib/upgrade.php +++ b/htdocs/lib/upgrade.php @@ -477,7 +477,8 @@ function core_install_defaults() { $user->lastname = 'User'; $user->email = 'root@example.org'; $user->quota = get_config_plugin('artefact', 'file', 'defaultquota'); - $newid = insert_record('usr', $user); + $user->authinstance = $auth_instance->id; + $newid = insert_record('usr', $user, 'id', true); if ($newid > 0 && get_config('dbtype') == 'mysql') { // gratuitous mysql workaround set_field('usr', 'id', 0, 'id', $newid); -- GitLab