// "sitepolicies" settingpage
$temp = new admin_settingpage('sitepolicies', get_string('sitepolicies', 'admin'));
$temp->add(new admin_setting_configselect('showsiteparticipantslist', get_string('showsiteparticipantslist', 'admin'), get_string('configshowsiteparticipantslist', 'admin'), 0, array(0 => get_string('siteteachers'), 1 => get_string('allteachers'), 2 => get_string('studentsandteachers'))));
+$temp->add(new admin_setting_configcheckbox('protectusernames', get_string('protectusernames', 'admin'), get_string('configprotectusernames', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('forcelogin', get_string('forcelogin', 'admin'), get_string('configforcelogin', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('forceloginforprofiles', get_string('forceloginforprofiles', 'admin'), get_string('configforceloginforprofiles', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('opentogoogle', get_string('opentogoogle', 'admin'), get_string('configopentogoogle', 'admin'), 0));
$string['configpathtoclam'] = 'Path to clam AV. Probably something like /usr/bin/clamscan or /usr/bin/clamdscan. You need this in order for clam AV to run.';
$string['configpathtodu'] = 'Path to du. Probably something like /usr/bin/du. If you enter this, pages that display directory contents will run much faster for directories with a lot of files.';
$string['configperfdebug'] = 'If you turn this on, performance info will be printed in the footer of the standard theme';
+$string['configprotectusernames'] = 'By default forget_password.php does not display any hints that would allow guessing of usernames or passwords.';
$string['configproxyhost'] = 'If this <b>server</b> needs to use a proxy computer (eg a firewall) to access the Internet, then provide the proxy hostname and port here. Otherwise leave it blank.';
$string['configquarantinedir'] = 'If you want clam AV to move infected files to a quarantine directory, enter it here. It must be writable by the webserver. If you leave this blank, or if you enter a directory that doesn\'t exit or isn\'t writable, infected files will be deleted. Do not include a trailing slash.';
$string['configrequestedteachername'] = 'Word for teacher used in requested courses';
$string['updatetimezones'] = 'Update timezones';
$string['upwards'] = 'upwards';
-?>
+?>
\ No newline at end of file
If you need help, please contact the site administrator,
$a->admin';
$string['emailconfirmationsubject'] = '$a: account confirmation';
+$string['emailpasswordconfirmmaybesent'] = ' <p>If you supplied correct username or address an email should have been sent to you.</p>
+ <p>It contains easy instructions to confirm and complete this password change.
+If you continue to have difficulty, please contact the site administrator.</p>';
$string['emailconfirmsent'] = ' <p>An email should have been sent to your address at <b>$a</b></p>
<p>It contains easy instructions to complete your registration.</p>
<p>If you continue to have difficulty, contact the site administrator.</p>';
$string['yourteacher'] = 'your $a';
$string['zippingbackup'] = 'Zipping backup';
-?>
+?>
\ No newline at end of file
if (empty($param->username) and empty($param->email)) {
$errors[] = 'no email or username';
}
+
+ if ($page != 'external' and !empty($CFG->protectusernames)) {
+ // do not give any hints about usernames or email!
+ $errors = array();
+ $page = 'emailmaybeconfirmed';
+ }
}
// ACTION = AUTHENTICATE
print_header( $txt->forgotten, $txt->forgotten,
"<a href=\"{$CFG->wwwroot}/login/index.php\">{$txt->login}</a>->{$txt->forgotten}",
'form.email' );
-print_simple_box_start('center');
-// display any errors
-if (count($errors)) {
- echo "<ul class=\"errors\">\n";
- foreach ($errors as $error) {
- echo " <li>$error</li>\n";
- }
- echo "</ul>\n";
+if ($page=='emailmaybeconfirmed') {
+ // Print general confirmation message
+ notice(get_string('emailpasswordconfirmmaybesent'),$CFG->wwwroot.'/index.php');
}
// check $page for appropriate page to display
}
else {
+ echo '<br />';
+ print_simple_box_start('center','50%','','20');
+
+ // display any errors
+ if (count($errors)) {
+ echo "<ul class=\"errors\">\n";
+ foreach ($errors as $error) {
+ echo " <li>$error</li>\n";
+ }
+ echo "</ul>\n";
+ }
+
?>
<p><?php echo $txt->forgotteninstructions; ?></p>