[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 String accessToken;
public String serverID;
public String email;
private String password_salt;
public long permissions;
//TODO: заменить EAGER на LASY и придумать способ сохранить сессию

View file

@ -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);