mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Merge pull request #397 from RelaxedArcher/master
Fixed an issue affecting registration in multi-user mode
This commit is contained in:
@@ -8,6 +8,7 @@ $ICEcoderSettings = array(
|
||||
"devMode" => false,
|
||||
"loginRequired" => true,
|
||||
"multiUser" => false,
|
||||
"lineEnding" => "\n"
|
||||
"lineEnding" => "\n",
|
||||
"enableRegistration" => true
|
||||
);
|
||||
?>
|
||||
@@ -27,6 +27,11 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
|
||||
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" class="password"><br><br>'.PHP_EOL;};?>
|
||||
<input type="password" name="password" class="password"><br><br>
|
||||
<input type="submit" name="submit" value="<?php if ($ICEcoder["multiUser"]) {echo "set password / login";} else {echo $ICEcoder["password"] == "" ? "set password" : "login";}; ?>" class="button">
|
||||
<?php
|
||||
if($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]){
|
||||
echo '<div class="text"><a href="javascript:alert(\'To disable registration mode, open lib/config___settings.php and change enableRegistration to false then reload this page\')">Registration mode enabled</a></div>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($ICEcoder["password"] == "" || $ICEcoder["multiUser"]) {
|
||||
echo '<div class="text"><input type="checkbox" name="checkUpdates" value="true" checked> auto-check for updates</div>';
|
||||
|
||||
@@ -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?");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user