Commit 3a23d2cf authored by Nigel McNie's avatar Nigel McNie
Browse files

Force auto_increment to restart from 1 after inserting the root user, which...

Force auto_increment to restart from 1 after inserting the root user, which makes sure the admin user gets ID 1.
parent a843e289
......@@ -554,6 +554,7 @@ function core_install_lastcoredata_defaults() {
if (is_mysql()) { // gratuitous mysql workaround
$newid = insert_record('usr', $user, 'id', true);
set_field('usr', 'id', 0, 'id', $newid);
execute_sql('ALTER TABLE {usr} AUTO_INCREMENT=1');
}
else {
insert_record('usr', $user);
......
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