[FEATURE] email при регистрации

This commit is contained in:
Gravit 2019-09-01 20:12:50 +07:00
parent 49e26d0d29
commit d9c4cfdbc8
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 3 additions and 0 deletions

View file

@ -36,6 +36,7 @@ public class User {
private byte[] password; private byte[] password;
private String accessToken; private String accessToken;
public String serverID; public String serverID;
public String email;
private String password_salt; private String password_salt;
public long permissions; public long permissions;
//TODO: заменить EAGER на LASY и придумать способ сохранить сессию //TODO: заменить EAGER на LASY и придумать способ сохранить сессию

View file

@ -14,6 +14,7 @@
public class RegisterResponse extends SimpleResponse { public class RegisterResponse extends SimpleResponse {
public String login; public String login;
public String password; public String password;
public String email;
public byte[] verifyHash; public byte[] verifyHash;
@Override @Override
public void execute(ChannelHandlerContext ctx, Client client) throws Exception 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 user = new User();
user.username = login; user.username = login;
user.email = email;
user.setPassword(password); user.setPassword(password);
user.uuid = UUID.randomUUID(); user.uuid = UUID.randomUUID();
server.config.dao.userService.saveUser(user); server.config.dao.userService.saveUser(user);