diff --git a/.devtools/data_generation_scripts/9999_reset_admin_password.php b/.devtools/data_generation_scripts/9999_reset_admin_password.php new file mode 100644 index 00000000..2023c1c0 --- /dev/null +++ b/.devtools/data_generation_scripts/9999_reset_admin_password.php @@ -0,0 +1,19 @@ +getDatabaseService()->GetDbConnection(); + +// Reset the password of the user "admin" to "admin" +$adminUserRow = $db->users()->where('username', 'admin')->fetch(); + +if ($adminUserRow == null) +{ + $adminUserRow = $db->users()->createRow([ + 'username' => 'admin' + ]); +} + +$adminUserRow->update([ + 'password' => password_hash('admin', PASSWORD_DEFAULT) +]);