public void updateUser(User user, String newPassword) { User find = userFacade.find(user.getId()); find.setUsername(user.getUsername()); find.setEmail(user.getEmail()); if (!newPassword.equals("")) { find.setPassword(newPassword); } }
public void deleteUser(long id) { User user = userFacade.find(id); if (user != null) { userFacade.remove(user); } }