/** * * @param sfEvent $event */ public function listenToFailedAuthentication(sfEvent $event) { $loginAttempt = new sfGuardLoginAttempt(); $loginAttempt->ip_address = $this->getUserIP(); $loginAttempt->host_name = $this->getUserHost(); $loginAttempt->save(); }
/** * Function used to add a failed login to the database */ function addFailedLogin() { $tmp = new sfGuardLoginAttempt(); $tmp->ip_address = '127.0.0.1'; $tmp->host_name = 'localhost'; $tmp->save(); }