public User(int id, String firstname, String lastname, String email, String password) { this.id = id; this.firstname = firstname; this.lastname = lastname; this.email = email; this.password = BCrypt.hashpw(password, BCrypt.gensalt()); // user this.userGroup.setId(3); this.lng = (new Language()).getCode(); this.timeZone = "Etc/UTC"; }
public void setPassword(String password) { String hashed = BCrypt.hashpw(password, BCrypt.gensalt()); this.password = hashed; }