Esempio n. 1
0
 public void unregister(User user) {
   feedEntryStatusDAO.delete(feedEntryStatusDAO.findAll(user, false, ReadingOrder.desc, false));
   feedSubscriptionDAO.delete(feedSubscriptionDAO.findAll(user));
   feedCategoryDAO.delete(feedCategoryDAO.findAll(user));
   userSettingsDAO.delete(userSettingsDAO.findByUser(user));
   userRoleDAO.delete(userRoleDAO.findAll(user));
   userDAO.delete(user);
 }
Esempio n. 2
0
  public BasePage() {

    String lang = "en";
    User user = CommaFeedSession.get().getUser();
    if (user != null) {
      UserSettings settings = userSettingsDAO.findByUser(user);
      if (settings != null) {
        lang = settings.getLanguage() == null ? "en" : settings.getLanguage();
      }
    }

    add(new TransparentWebMarkupContainer("html").add(new AttributeModifier("lang", lang)));

    settings = applicationSettingsService.get();
    add(new HeaderResponseContainer("footer-container", "footer-container"));
    add(
        new WebMarkupContainer("uservoice") {
          @Override
          protected void onConfigure() {
            super.onConfigure();
            setVisibilityAllowed(settings.isFeedbackButton());
          }
        });
  }