src/Webiny/Login/Login.php
private function resetRateLimit()
    {
        // clear the logs for the current ip/username combo
        LoginRateControlEntity::find(['ip' => $this->ip, 'username' => $this->username])->delete();

        // delete all records older than 30 days
        $ts = time() - (30 * 86400);
        LoginRateControlEntity::find([
            'timestamp' => [
                '$lt' => [$ts]
            ]
        ])->delete();
    }
private function resetRateLimit()
    {
        // clear the logs for the current ip/username combo
        LoginRateControlEntity::find(['ip' => $this->ip, 'username' => $this->username])->delete();

        // delete all records older than 30 days
        $ts = time() - (30 * 86400);
        LoginRateControlEntity::find([
            'timestamp' => [
                '$lt' => [$ts]
            ]
        ])->delete();
    }
private function resetRateLimit ( ) { // clear the logs for the current ip/username combo LoginRateControlEntity :: find ( [ 'ip' => $ this -> ip , 'username' => $ this -> username ] ) -> delete ( ) ; // delete all records older than 30 days $ ts = time ( ) - ( 30 * 86400 ) ; LoginRateControlEntity :: find ( [ 'timestamp' => [ '$lt' => [ $ ts ] ] ] ) -> delete ( ) ; }
Resets the rate limit for the current ip and username.
It also clears the records that are older than 30 days.
Resets the rate limit for the current ip and username . It also clears the records that are older than 30 days .