Convert usernames to lowercase before performing a lower case search

This commit is contained in:
Colin McDonald 2016-08-18 16:23:37 -04:00
parent dc16fa7b6f
commit 96c55ea6c8

View File

@ -150,7 +150,7 @@ public final class User {
}
public static void findByLastUsernameLower(String lastUsernameLower, SingleResultCallback<User> callback) {
usersCollection.find(new Document("lastUsernameLower", lastUsernameLower)).first(SyncUtils.vertxWrap(callback));
usersCollection.find(new Document("lastUsernameLower", lastUsernameLower.toLowerCase())).first(SyncUtils.vertxWrap(callback));
}
public static void findOrCreateByIdGrouped(Map<UUID, String> search, SingleResultCallback<Map<UUID, User>> callback) {