X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/055ded3a8a9c59f7f4bb426e4a8c2ffb41f994a2..579020f8c67f7bdfd9d530a25b701af6ee53c412:/settings/install.php diff --git a/settings/install.php b/settings/install.php index dc4d59d..c114b5f 100644 --- a/settings/install.php +++ b/settings/install.php @@ -96,11 +96,11 @@ $writable = (is_writable("../config/")) ? true: false; $auth_method_name = NULL; switch($auth_method) { - case "sql_auth": - $auth_method_name = "SQLAuth"; + case "sql_db": + $auth_method_name = "SQLDB"; break; - case "file_auth": - $auth_method_name = "FileAuth"; + case "file_db": + $auth_method_name = "FileDB"; break; } if ($auth_method) @@ -118,7 +118,7 @@ $writable = (is_writable("../config/")) ? true: false; $config["base_url"] = BASE_URL; $config["plugins"] = Array("$auth_method"); - if ($auth_method == "sql_auth") + if ($auth_method == "sql_db") { $config["mysql"] = [ "host" => $opts->sql_host, @@ -129,12 +129,20 @@ $writable = (is_writable("../config/")) ? true: false; ]; } + 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, @@ -152,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(); @@ -185,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:
- -
- -
@@ -277,6 +285,51 @@ $writable = (is_writable("../config/")) ? true: false;
+ + + + + + + \ No newline at end of file