X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/54b9603ced28334eec94ec45aca67e7bdd0d2078..579020f8c67f7bdfd9d530a25b701af6ee53c412:/settings/install.php diff --git a/settings/install.php b/settings/install.php index c98e2f5..c114b5f 100644 --- a/settings/install.php +++ b/settings/install.php @@ -1,6 +1,22 @@ $opts->sql_host, "database" => $opts->sql_db, "username" => $opts->sql_user, "password" => $opts->sql_password, + "table_prefix" => $opts->sql_table_prefix, ]; } + generate_secrets(); + /* First, write only the config file */ write_config_file(); - if ($auth_method == "sql_auth") - if (!sql_auth::create_tables()) + if ($auth_method == "sql_db") + { + sql_db::delete_tables(); + if (!sql_db::create_tables()) Message::Fail("Could not create SQL tables"); + } else if ($auth_method == "file_db") + { + file_db::delete_db(); + } $user = [ "user_name" => $opts->account_user, @@ -135,7 +160,7 @@ $writable = (is_writable("../config/")) ? true: false; Message::Fail("Could not create user"); return; } - $lkup->add_permission(PERMISSION_MANAGE_USERS); + $lkup->add_meta('role', 'Super-Admin'); /* Now, write all the config (config.php + settings in DB) */ write_config(); @@ -168,22 +193,22 @@ $writable = (is_writable("../config/")) ? true: false;
-
Authentication Backend
+
Database Backend

- Which authentication backend would you like to use? + Which database backend would you like to use?

Please choose from the available options:
- -
- -
@@ -202,12 +227,17 @@ $writable = (is_writable("../config/")) ? true: false;
- + The name of SQL user
- + +
+
+ + + The prefix for table names (leave blank for none)
@@ -255,6 +285,51 @@ $writable = (is_writable("../config/")) ? true: false;
+ + + + + + + \ No newline at end of file