From d9c4cfdbc89e9954ba6b34d21d9becae112f0e06 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 1 Sep 2019 20:12:50 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20email=20=D0=BF=D1=80=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/pro/gravit/launchserver/dao/User.java | 1 + .../launchserver/socket/response/auth/RegisterResponse.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java b/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java index 0573c2c3..c25d8c13 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/dao/User.java @@ -36,6 +36,7 @@ public class User { private byte[] password; private String accessToken; public String serverID; + public String email; private String password_salt; public long permissions; //TODO: заменить EAGER на LASY и придумать способ сохранить сессию 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 b5fae77e..97b89be9 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 @@ -14,6 +14,7 @@ public class RegisterResponse extends SimpleResponse { public String login; public String password; + public String email; public byte[] verifyHash; @Override public void execute(ChannelHandlerContext ctx, Client client) throws Exception @@ -32,6 +33,7 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception } User user = new User(); user.username = login; + user.email = email; user.setPassword(password); user.uuid = UUID.randomUUID(); server.config.dao.userService.saveUser(user);