Skip to content

Commit 6898d4d

Browse files
committed
CSHARP-1266: Fix pre-2.6 AddUser on sharded systems.
1 parent 568398c commit 6898d4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/MongoDB.Driver.Legacy/Operations/AddUserUsingSystemUsersCollectionOperation.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public async Task<bool> ExecuteAsync(IWriteBinding binding, CancellationToken ca
6060
{
6161
user = new BsonDocument
6262
{
63+
{ "_id", ObjectId.GenerateNewId() },
6364
{ "user", _username },
6465
{ "pwd", _passwordHash },
6566
{ "readOnly", _readOnly },

0 commit comments

Comments
 (0)