public function saveFailure($username, Request $request)
    {
        $this->removeOldFailures();

        $failure = new AuthFailure();
        $failure->setIp($request->getClientIp());
        $failure->setUsername($username);
        $failure->setLocked(true);

        $this->em->persist($failure);
        $this->em->flush();

        return $this;
    }
public function saveFailure($username, Request $request)
    {
        $this->removeOldFailures();

        $failure = new AuthFailure();
        $failure->setIp($request->getClientIp());
        $failure->setUsername($username);
        $failure->setLocked(true);

        $this->em->persist($failure);
        $this->em->flush();

        return $this;
    }
public function saveFailure ( $ username , Request $ request ) { $ this -> removeOldFailures ( ) ; $ failure = new AuthFailure ( ) ; $ failure -> setIp ( $ request -> getClientIp ( ) ) ; $ failure -> setUsername ( $ username ) ; $ failure -> setLocked ( true ) ; $ this -> em -> persist ( $ failure ) ; $ this -> em -> flush ( ) ; return $ this ; }
Saves an authentication failure

@param string  $username
@param Request $request

@return FailureManager
Saves an authentication failure