docs: public void acceptAgreement() {
  
          // store accepted flag in current users settings
          getSettings().setUserAgreementAccepted(true);
          // check accepted agreement version
          if (getAcceptedVersion() < getRequiredVersion()) {
              // a new (higher) version was accepted, increase version to store and reset accepted count
              setAcceptedVersion(getRequiredVersion());
              setAcceptedCount(0);
          }
          // increase accepted count
          setAcceptedCount(getAcceptedCount() + 1);
          // create the JSON data structure that is stored in the additional info
          JSONObject jsonData = new JSONObject();
          try {
              jsonData.put(KEY_ACCEPTED_VERSION, getRequiredVersion());
              jsonData.put(KEY_ACCEPTED_COUNT, m_acceptedCount);
              // store accepted data in users additional information
              CmsUser user = getCms().getRequestContext().getCurrentUser();
              user.setAdditionalInfo(CmsUserSettings.LOGIN_USERAGREEMENT_ACCEPTED, jsonData.toString());
              // write the changed user
              getCms().writeUser(user);
          } catch (Exception e) {
              LOG.error(e);
          }
      }