mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-19 06:47:10 +01:00
Change true to false if checkbox is set
This commit is contained in:
@@ -260,6 +260,17 @@ if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER[
|
||||
die("Couldn't create $settingsFileAddr. Maybe you need write permissions on the lib folder?");
|
||||
}
|
||||
}
|
||||
// Disable the enableRegistration config setting if the user had that option chosen
|
||||
if (isset($_POST['disableFurtherRegistration'])) {
|
||||
$updatedConfigSettingsFile = file_get_contents(dirname(__FILE__)."/".$configSettings);
|
||||
if ($fUConfigSettings = fopen(dirname(__FILE__)."/".$configSettings, 'w')) {
|
||||
$updatedConfigSettingsFile = str_replace('"enableRegistration" => true','"enableRegistration" => false',$updatedConfigSettingsFile);
|
||||
fwrite($fUConfigSettings, $updatedConfigSettingsFile);
|
||||
fclose($fUConfigSettings);
|
||||
} else {
|
||||
die("Cannot update config file lib/".$configSettings.". Please check write permissions on lib/ and try again");
|
||||
}
|
||||
}
|
||||
// Set the session user level
|
||||
if ($ICEcoder["multiUser"]) {
|
||||
$_SESSION['username']=$_POST['username'];
|
||||
|
||||
Reference in New Issue
Block a user