BCrypt.checkpw("test", password);
}
catch (Exception e) {
password = BCrypt.hashpw(password, BCrypt.gensalt());
}
UserRole role = UserRole.valueOf(element.elementText("role"));
UserEntity user = getDao().getUserDao().getByEmail(email);
if (user == null) {
user = new UserEntity(name, password, email, role);
}
user.setName(name);