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

feat/data-edit-commands
Preva1l 9 months ago committed by GitHub
parent 2b1e72a42e
commit 550ea26097
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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);

Loading…
Cancel
Save