Commit 3cca5602 authored by Penny Leach's avatar Penny Leach

fixing up the mysql fix that broke the installer on postgres

parent 1772c721
......@@ -478,12 +478,14 @@ function core_install_defaults() {
$user->email = 'root@example.org';
$user->quota = get_config_plugin('artefact', 'file', 'defaultquota');
$user->authinstance = $auth_instance->id;
$newid = insert_record('usr', $user, 'id', true);
if ($newid > 0 && get_config('dbtype') == 'mysql') { // gratuitous mysql workaround
if (get_config('dbtype') == 'mysql') { // gratuitous mysql workaround
$newid = insert_record('usr', $user, 'id', true);
set_field('usr', 'id', 0, 'id', $newid);
}
else {
insert_record('usr', $user);
}
// Insert the admin user
$user = new StdClass;
$user->username = 'admin';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment