mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FEATURE][FIX] Проверка зарегистрирован ли уже пользователь
This commit is contained in:
parent
5df618787f
commit
c8211ae7dd
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue