if ( $missingKeys ) {
$this->logger->info( 'Session "{session}": Missing metadata: {missing}', [
'session' => $info,
- 'missing' => join( ', ', $missingKeys ),
+ 'missing' => implode( ', ', $missingKeys ),
] );
return false;
}
return true;
}
+ /**
+ * @codeCoverageIgnore
+ */
public function preventSessionsForUser( $username ) {
BotPassword::removeAllPasswordsForUser( $username );
}
public function getAllowedUserRights( SessionBackend $backend ) {
if ( $backend->getProvider() !== $this ) {
- throw new InvalidArgumentException( 'Backend\'s provider isn\'t $this' );
+ throw new \InvalidArgumentException( 'Backend\'s provider isn\'t $this' );
}
$data = $backend->getProviderMetadata();
- if ( $data ) {
+ if ( $data && isset( $data['rights'] ) && is_array( $data['rights'] ) ) {
return $data['rights'];
}