diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RegisterResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RegisterResponse.java index c1833660..b9508345 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RegisterResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RegisterResponse.java @@ -24,6 +24,12 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception sendError("Hash invalid"); return; } + User checkUser = server.userService.findUserByUsername(login); + if(checkUser != null) + { + sendError("User already register"); + return; + } User user = new User(); user.username = login; user.setPassword(password);