Skip to content

Commit

Permalink
Fix installer's allow-registration option: 'approval' option was neve…
Browse files Browse the repository at this point in the history
…r saved to database (2)
  • Loading branch information
ywarnier committed Jul 13, 2016
1 parent 77f03b6 commit 5cd232c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main/install/index.php
Expand Up @@ -258,8 +258,8 @@
$checkEmailByHashSent = 0;
$ShowEmailNotCheckedToStudent = 1;
$userMailCanBeEmpty = 1;
$allowSelfReg = 1;
$allowSelfRegProf = 1;
$allowSelfReg = 'approval';
$allowSelfRegProf = 1; //by default, a user can register as teacher (but moderation might be in place)
$encryptPassForm = 'bcrypt';
if (!empty($_GET['profile'])) {
$installationProfile = api_htmlentities($_GET['profile'], ENT_QUOTES);
Expand Down Expand Up @@ -570,7 +570,7 @@ function send_contact_information() {
$encryptPassForm = 'none';
}

$allowSelfReg = false;
$allowSelfReg = 'approval';
$tmp = get_config_param_from_db('allow_registration');
if (!empty($tmp)) {
$allowSelfReg = $tmp;
Expand Down Expand Up @@ -616,7 +616,7 @@ function send_contact_information() {
echo get_lang('AdminLogin') . ' : <strong>' . $loginForm . '</strong><br />';
echo get_lang('AdminPass') . ' : <strong>' . $passForm . '</strong><br /><br />'; /* TODO: Maybe this password should be hidden too? */
}

$allowSelfRegistrationLiteral = ($allowSelfReg == 'true') ? get_lang('Yes') : ($allowSelfReg == 'approval' ? get_lang('Approval') : get_lang('No'));
echo get_lang('AdminFirstName').' : '.$adminFirstName, '<br />', get_lang('AdminLastName').' : '.$adminLastName, '<br />';
echo get_lang('AdminEmail').' : '.$emailForm; ?><br />
<?php echo get_lang('AdminPhone').' : '.$adminPhoneForm; ?><br />
Expand All @@ -626,7 +626,7 @@ function send_contact_information() {
<?php echo get_lang('DBLogin').' : '.$dbUsernameForm; ?><br />
<?php echo get_lang('DBPassword').' : '.str_repeat('*', api_strlen($dbPassForm)); ?><br />
<?php echo get_lang('MainDB').' : <strong>'.$dbNameForm; ?></strong><br />
<?php echo get_lang('AllowSelfReg').' : '.($allowSelfReg ? get_lang('Yes') : get_lang('No')); ?><br />
<?php echo get_lang('AllowSelfReg').' : '. $allowSelfRegistrationLiteral; ?><br />
<?php echo get_lang('EncryptMethodUserPass').' : ';
echo $encryptPassForm;
?>
Expand Down

0 comments on commit 5cd232c

Please sign in to comment.