Modify User#findByPhone to search for usages in both confirmed numbers and pending numbers
This commit is contained in:
parent
f84f8635a2
commit
07e1090445
@ -84,7 +84,10 @@ public final class User {
|
||||
}
|
||||
|
||||
public static void findByPhone(String phoneNumber, SingleResultCallback<User> callback) {
|
||||
usersCollection.find(new Document("phone", phoneNumber)).first(SyncUtils.vertxWrap(callback));
|
||||
usersCollection.find(new Document("$or", ImmutableList.of(
|
||||
new Document("phone", phoneNumber),
|
||||
new Document("pendingPhone", phoneNumber)
|
||||
))).first(SyncUtils.vertxWrap(callback));
|
||||
}
|
||||
|
||||
public static void findByEmail(String email, SingleResultCallback<User> callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user