Пример #1
0
 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);
   }
 }
Пример #2
0
 public void deleteUser(long id) {
   User user = userFacade.find(id);
   if (user != null) {
     userFacade.remove(user);
   }
 }