Esempio n. 1
0
 /**
  * Sets the banned property of a user to true
  *
  * @param username The name of the user
  * @return if the customer was found
  */
 public Boolean ban(String username) {
   CustomerDTO customer = em.find(Customer.class, username);
   if (customer == null) {
     return false;
   } else {
     customer.setBanned(true);
     em.merge(customer);
     return true;
   }
 }