From 6a50c1ce2b6a6a5e5599a48bd2569408301b2a43 Mon Sep 17 00:00:00 2001 From: RelaxedArcher Date: Sat, 10 May 2014 02:30:22 +0300 Subject: [PATCH] Fixed an issue that caused registration to be always available while in multi-user mode --- lib/config___settings.php | 3 ++- lib/login.php | 5 +++++ lib/settings.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/config___settings.php b/lib/config___settings.php index 601a60d..6aebb4a 100644 --- a/lib/config___settings.php +++ b/lib/config___settings.php @@ -8,6 +8,7 @@ $ICEcoderSettings = array( "devMode" => false, "loginRequired" => true, "multiUser" => false, - "lineEnding" => "\n" + "lineEnding" => "\n", + "enableRegistration" => true ); ?> \ No newline at end of file diff --git a/lib/login.php b/lib/login.php index 55a3c2e..7dcdcf3 100644 --- a/lib/login.php +++ b/lib/login.php @@ -27,6 +27,11 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";

'.PHP_EOL;};?>

" class="button"> + Registration mode enabled'; + } + ?> auto-check for updates'; diff --git a/lib/settings.php b/lib/settings.php index 3458932..ac08951 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -19,7 +19,7 @@ $settingsFile = 'config-'.$username.str_replace(".","_",str_replace("www.","",$_ $setPWorLogin = "login"; // Create user settings file if it doesn't exist -if (!file_exists(dirname(__FILE__)."/".$settingsFile)) { +if (!file_exists(dirname(__FILE__)."/".$settingsFile) && $ICEcoderSettings['enableRegistration']) { if (!copy(dirname(__FILE__)."/".$configUsersTemplate, dirname(__FILE__)."/".$settingsFile)) { die("Couldn't create $settingsFile. Maybe you need write permissions on the lib folder?"); }