public function __construct( $params = [] ) {
$this->throttleSettings = array_intersect_key( $params,
[ 'accountCreationThrottle' => true, 'passwordAttemptThrottle' => true ] );
- $this->cache = isset( $params['cache'] ) ? $params['cache'] :
- \ObjectCache::getLocalClusterInstance();
+ $this->cache = $params['cache'] ?? \ObjectCache::getLocalClusterInstance();
}
public function setConfig( Config $config ) {
$data = $this->manager->getAuthenticationSessionData( 'LoginThrottle' );
if ( !$data ) {
- $this->logger->error( 'throttler data not found for {user}', [ 'user' => $user->getName() ] );
+ // this can occur when login is happening via AuthenticationRequest::$loginRequest
+ // so testForAuthentication is skipped
+ $this->logger->info( 'throttler data not found for {user}', [ 'user' => $user->getName() ] );
return;
}