]> git.mjollnir.org Git - moodle.git/commitdiff
FIxed some variables for login error logging
authormoodler <moodler>
Sun, 25 Jul 2004 14:39:19 +0000 (14:39 +0000)
committermoodler <moodler>
Sun, 25 Jul 2004 14:39:19 +0000 (14:39 +0000)
admin/config.html
lang/en/moodle.php
lib/defaults.php
lib/moodlelib.php

index d94fdd128df1eeaed833543f2c6e1ffcbfed2708..0e3290a29cfcdf64897c3a10922996d7e8a4eef4 100644 (file)
     </td>
 </tr>
 <tr valign="top">
-    <td align="right"><p>notifythreshold:</p></td>
+    <td align="right"><p>notifyloginthreshold:</p></td>
     <td>
     <?php
        unset($options);
        for ($i=1; $i<=100; $i++) {
            $options[$i] = "$i";
        }
-       choose_from_menu($options,"notifythreshold",$config->notifythreshold,"","","");
+       choose_from_menu($options,"notifyloginthreshold",$config->notifyloginthreshold,"","","");
     ?>
     </td>
     <td>
-    <?php print_string('confignotifythreshold') ?>
+    <?php print_string('confignotifyloginthreshold') ?>
     </td>
 </tr>
 <tr valign=top>
index fc3383153e0f8b176f829aa922546d4ec44ee392..5ba5a2373d8214fb150c1fab7029a37e98bf0f54 100644 (file)
@@ -177,7 +177,7 @@ $string['configmaxbytes'] = 'This specifies a maximum size that uploaded files c
 $string['configmaxeditingtime'] = 'This specifies the amount of time people have to re-edit forum postings, journal feedback etc.  Usually 30 minutes is a good value.';
 $string['confignoreplyaddress'] = 'Emails are sometimes sent out on behalf of a user (eg forum posts). The email address you specify here will be used as the \"From\" address in those cases when the recipients should not be able to reply directly to the user (eg when a user chooses to keep their address private).';
 $string['confignotifyloginfailures'] = 'If login failures have been recorded, email notifications can be sent out.  Who should see these notifications?';
-$string['confignotifythreshold'] = 'If notifications about failed logins are active, how many failed login attempts by one user or one IP address is it worth notifying about?';
+$string['confignotifyloginthreshold'] = 'If notifications about failed logins are active, how many failed login attempts by one user or one IP address is it worth notifying about?';
 $string['configopentogoogle'] = 'If you enable this setting, then Google will be allowed to enter your site as a Guest.  In addition, people coming in to your site via a Google search will automatically be logged in as a Guest.  Note that this only provides transparent access to courses that already allow guest access.';
 $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['configsecureforms'] = 'Moodle can use an additional level of security when accepting data from web forms. If this is enabled, then the browser\'s HTTP_REFERER variable is checked against the current form address.  In a very few cases this can cause problems if the user is using a firewall (eg Zonealarm) configured to strip HTTP_REFERER from their web traffic.  Symptoms are getting \'stuck\' on a form. If your users are having problems with the login page (for example) you might want to disable this setting, although it might leave your site more open to brute-force password attacks.  If in doubt, leave this set to \'Yes\'.';
index 56abb7d80046c4575a5226f5b29a2dcc33274640..d5b7140a599c2f84c5d85885c509623e60955852 100644 (file)
@@ -4,54 +4,57 @@
 // It defines default values for any important configuration variables
 
    $defaults = array (
-       "auth"             => "email",
-       "autologinguests"  => 0,
-       "allowunenroll"    =>  true,
-       "cachetext"        =>  60,
-       "changepassword"   =>  true,
-       "country"          => "",
-       "debug"            =>  7,
-       "deleteunconfirmed" => 168,
-       "enablerssfeeds"   => 0,
-       "enrol"            => 'internal',
-       "extendedusernamechars"   => false,
-       "filteruploadedfiles"  =>  true,
-       "forcelogin"       =>  false,
-       "forceloginforprofiles"  =>  false,
-       "fullnamedisplay"  => "firstname lastname",
-       "framename"        => "_top",
-       "frontpage"        =>  0,
-       "gdversion"        =>  1,
-       "guestloginbutton" =>  1,
-       "htmleditor"       =>  true,
-       "lang"             => "en",
-       "langmenu"         =>  1,
-       "langlist"         => "",
-       "locale"           => "en",
-       "loglifetime"      =>  0,
-       "longtimenosee"    =>  100,
-       "maxbytes"         =>  0,
-       "maxeditingtime"   =>  1800,
-       "noreplyaddress"   => 'noreply@'.$_SERVER['HTTP_HOST'],
-       "opentogoogle"     =>  false,
-       "prefix"           => "",
-       "proxyhost"        => "",
-       "proxyport"        => "",
-       "secureforms"      =>  false,
-       "sessioncookie"    => "",
-       "sessiontimeout"   =>  7200,
-       "slasharguments"   =>  1,
-       "smtphosts"        => "",
-       "smtppass"         => "",
-       "smtpuser"         => "",
-       "style"            => "default",
-       "teacherassignteachers"  => true,
-       "template"         => "default",
-       "textfilters"      => "mod/glossary/dynalink.php",
-       "timezone"         => 99,
-       "theme"            => "standard",
-       "unzip"            => "",
-       "zip"              => ""
+       "auth"                     => "email",
+       "autologinguests"          => 0,
+       "allowunenroll"            =>  true,
+       "cachetext"                =>  60,
+       "changepassword"           =>  true,
+       "country"                  => "",
+       "debug"                    =>  7,
+       "deleteunconfirmed"        => 168,
+       "displayloginfailures"     => '',
+       "enablerssfeeds"           => 0,
+       "enrol"                    => 'internal',
+       "extendedusernamechars"    => false,
+       "filteruploadedfiles"      =>  true,
+       "forcelogin"               =>  false,
+       "forceloginforprofiles"    =>  false,
+       "fullnamedisplay"          => "firstname lastname",
+       "framename"                => "_top",
+       "frontpage"                =>  0,
+       "gdversion"                =>  1,
+       "guestloginbutton"         =>  1,
+       "htmleditor"               =>  true,
+       "lang"                     => "en",
+       "langmenu"                 =>  1,
+       "langlist"                 => "",
+       "locale"                   => "en",
+       "loglifetime"              =>  0,
+       "longtimenosee"            =>  100,
+       "maxbytes"                 =>  0,
+       "maxeditingtime"           =>  1800,
+       "noreplyaddress"           => 'noreply@'.$_SERVER['HTTP_HOST'],
+       "notifyloginfailures"      => '',
+       "notifyloginthreshold"     =>  10,
+       "opentogoogle"             =>  false,
+       "prefix"                   => "",
+       "proxyhost"                => "",
+       "proxyport"                => "",
+       "secureforms"              =>  false,
+       "sessioncookie"            => "",
+       "sessiontimeout"           =>  7200,
+       "slasharguments"           =>  1,
+       "smtphosts"                => "",
+       "smtppass"                 => "",
+       "smtpuser"                 => "",
+       "style"                    => "default",
+       "teacherassignteachers"    => true,
+       "template"                 => "default",
+       "textfilters"              => "mod/glossary/dynalink.php",
+       "timezone"                 => 99,
+       "theme"                    => "standard",
+       "unzip"                    => "",
+       "zip"                      => ""
     );
 
 ?>
index 166b365d695ca120b6e4a18566b6c25009b35d7f..19c1c4bc0c4dc5cc00bc5221ddd2232729095b30 100644 (file)
@@ -2383,15 +2383,15 @@ function notify_login_failures() {
     }
     
     // we need to deal with the threshold stuff first. 
-    if (empty($CFG->notifythreshold)) {
-        $CFG->notifythreshold = 10; // default to something sensible.
+    if (empty($CFG->notifyloginthreshold)) {
+        $CFG->notifyloginthreshold = 10; // default to something sensible.
     }
 
     $notifyipsrs = $db->Execute("SELECT ip FROM {$CFG->prefix}log WHERE time > {$CFG->lastnotifyfailure} 
-                          AND module='login' AND action='error' GROUP BY ip HAVING count(*) > $CFG->notifythreshold");
+                          AND module='login' AND action='error' GROUP BY ip HAVING count(*) > $CFG->notifyloginthreshold");
 
     $notifyusersrs = $db->Execute("SELECT info FROM {$CFG->prefix}log WHERE time > {$CFG->lastnotifyfailure} 
-                          AND module='login' AND action='error' GROUP BY info HAVING count(*) > $CFG->notifythreshold");
+                          AND module='login' AND action='error' GROUP BY info HAVING count(*) > $CFG->notifyloginthreshold");
     
     if ($notifyipsrs) {
         while ($row = $notifyipsrs->FetchRow()) {