// Someone wants to log in :
} elseif (OC::tryFormLogin()) {
$error[] = 'invalidpassword';
- OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:'.$_SERVER['REMOTE_ADDR'],
- OC_Log::ERROR);
+ if ( OC_Config::getValue('log_authfailip', '') ) {
+ OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:'.$_SERVER['REMOTE_ADDR'],
+ OC_Log::WARN);
+ }
+ else {
+ OC_Log::write('core', 'Login failed: user \''.$_POST["user"].'\' , wrong password, IP:set log_authfailip=true in conf',
+ OC_Log::WARN);
+ }
}
OC_Util::displayLoginPage(array_unique($error));