Warn a user with an error that there have been failed login attempts for their account. Login errors can be cleared by clicking on the URL in the message itself. Fixes #240
13 lines
277 B
PHP
13 lines
277 B
PHP
<?php
|
|
|
|
// Make sure we are called from index.php
|
|
if (!defined('SECURITY')) die('Hacking attempt');
|
|
|
|
if ($user->isAuthenticated()) {
|
|
// Reset failed login counter
|
|
$user->setUserFailed($_SESSION['USERDATA']['id'], 0);
|
|
header("Location: " . $_SERVER['HTTP_REFERER']);
|
|
}
|
|
|
|
?>
|