return false;
} else {
personUsername = p.getNewUsername();
EntityManager em = Persistence.createEntityManagerFactory(entityManagerFactoryString).createEntityManager();
//if (!DatabaseKoppeling.register(personUsername, p.getZipcode().replace(" ", ""), p.getName(), p.getAddress(), p.getZipcode(), p.getCity(), p.getEmail(), p.getPhone(), false, false))
if (!DatabaseORM.insertAccount(em, new Account(personUsername, p.getZipcode().replace(" ", ""), p.getName(), p.getAddress(), p.getZipcode(), p.getCity(), p.getEmail(), p.getPhone(), 0, new Timestamp(new Date().getTime()))))
return false;
}
PreparedStatement ps = con.prepareStatement("INSERT INTO PHOTO_OWNER VALUES(?, ?);");
ps.setInt(1, photoName);