mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2026-01-06 15:41:56 +00:00
fix: MongoDB duplicate user table entries & not updating cached username (#301)
This commit is contained in:
@@ -113,7 +113,7 @@ public class MongoDbDatabase extends Database {
|
|||||||
throw new MongoException("User document returned null!");
|
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);
|
mongoCollectionHelper.updateDocument(usersTable, doc, updates);
|
||||||
} catch (MongoException e) {
|
} catch (MongoException e) {
|
||||||
plugin.log(Level.SEVERE, "Failed to insert a user into the database", e);
|
plugin.log(Level.SEVERE, "Failed to insert a user into the database", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user