diff --git a/includes/Helpers/ManageWikiPermissions.php b/includes/Helpers/ManageWikiPermissions.php index 41cf86df2..b4c2c9186 100644 --- a/includes/Helpers/ManageWikiPermissions.php +++ b/includes/Helpers/ManageWikiPermissions.php @@ -237,9 +237,8 @@ public function commit() { private function deleteUsersFromGroup( string $group ) { $groupManager = MediaWikiServices::getInstance()->getUserGroupManager(); - $dbr = MediaWikiServices::getInstance()->getDBLoadBalancerFactory() - ->getMainLB( $this->wiki ) - ->getMaintenanceConnectionRef( DB_REPLICA, [], $this->wiki ); + $dbr = MediaWikiServices::getInstance()->getConnectionProvider() + ->getReplicaDatabase( $this->wiki ); $res = $dbr->select( 'user_groups',