function _login_security_add_event in Login Security 7
Same name and namespace in other branches
- 8 login_security.module \_login_security_add_event()
- 6 login_security.module \_login_security_add_event()
- 2.x login_security.module \_login_security_add_event()
Save the login attempt in the tracking database: user name nd ip address.
Parameters
string $name: user name to be tracked.
string $ip: IP Address of the pair.
1 call to _login_security_add_event()
- login_security_set_login_timestamp in ./
login_security.module - Save login attempt and save login/access timestamps.
File
- ./
login_security.module, line 361 - Login Security
Code
function _login_security_add_event($name, $ip) {
// Each attempt is kept for future minning of advanced bruteforcing like
// multiple IP or X-Forwarded-for usage and automated track data cleanup.
$event = new stdClass();
$event->host = $ip;
$event->name = $name;
$event->timestamp = REQUEST_TIME;
drupal_write_record('login_security_track', $event);
}