working in list management
This commit is contained in:
@@ -100,9 +100,6 @@ public class User {
|
||||
throw new InvalidKeyException();
|
||||
}
|
||||
|
||||
public Map<String,String> map() {
|
||||
return Map.of(EMAIL,email,NAME,name);
|
||||
}
|
||||
|
||||
private boolean matching(String password) {
|
||||
return hashedPass.equals(Util.sha256(password+salt));
|
||||
@@ -124,11 +121,14 @@ public class User {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map<String,String> safeMap(){
|
||||
return Map.of(NAME,name,EMAIL,email,PASSWORD,hashedPassword() == null ? "no" : "yes");
|
||||
}
|
||||
|
||||
private User save() throws SQLException {
|
||||
Database.open().insertInto(TABLE_NAME)
|
||||
.values(Map.of(EMAIL,email,NAME,name,SALT,salt,HASHED_PASS,hashedPass))
|
||||
.run();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user