9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-25 09:39:18 +00:00

fix: MongoDB duplicate user table entries & not updating cached username (#301)

This commit is contained in:
Preva1l
2024-05-13 19:50:58 +10:00
committed by GitHub
parent 2b1e72a42e
commit 550ea26097

View File

@@ -113,7 +113,7 @@ public class MongoDbDatabase extends Database {
throw new MongoException("User document returned null!");
}
Bson updates = Updates.set("uuid", user.getUuid().toString());
Bson updates = Updates.set("username", user.getUsername());
mongoCollectionHelper.updateDocument(usersTable, doc, updates);
} catch (MongoException e) {
plugin.log(Level.SEVERE, "Failed to insert a user into the database", e);