Rename User#findByEmail to User#findByConfirmedEmail to remove ambiguity
This commit is contained in:
parent
18c0868baf
commit
95440504d5
@ -132,7 +132,7 @@ public final class User {
|
||||
}
|
||||
}
|
||||
|
||||
public static void findByEmail(String email, SingleResultCallback<User> callback) {
|
||||
public static void findByConfirmedEmail(String email, SingleResultCallback<User> callback) {
|
||||
usersCollection.find(new Document("email", email)).first(SyncUtils.vertxWrap(callback));
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ public final class GETUsersIdVerifyPassword implements Handler<RoutingContext> {
|
||||
}
|
||||
|
||||
if (user == null) {
|
||||
user = SyncUtils.runBlocking(v -> User.findByEmail(ctx.request().getParam("userId"), v));
|
||||
user = SyncUtils.runBlocking(v -> User.findByConfirmedEmail(ctx.request().getParam("userId"), v));
|
||||
}
|
||||
|
||||
if (user == null) {
|
||||
|
@ -50,7 +50,7 @@ public final class POSTUsersIdRegisterEmail implements Handler<RoutingContext> {
|
||||
return;
|
||||
}
|
||||
|
||||
User sameEmail = SyncUtils.runBlocking(v -> User.findByEmail(email, v));
|
||||
User sameEmail = SyncUtils.runBlocking(v -> User.findByConfirmedEmail(email, v));
|
||||
|
||||
if (sameEmail != null) {
|
||||
ErrorUtils.respondInvalidInput(ctx, email + " is already in use.");
|
||||
|
Loading…
Reference in New Issue
Block a user