code: public void submit(CmsUser user, CmsObject cms, Runnable afterWrite, boolean force) {
  
          try {
              if (isValid() | force) {
                  if (force) {
                      removeValidators();
                  }
                  m_binder.commit();
                  PropertyUtilsBean propUtils = new PropertyUtilsBean();
                  for (CmsAccountInfo info : OpenCms.getWorkplaceManager().getAccountInfos()) {
                      boolean editable = (m_editLevel == EditLevel.all)
                          || ((m_editLevel == EditLevel.configured) && info.isEditable());
                      if (editable) {
                          if (info.isAdditionalInfo()) {
                              user.setAdditionalInfo(info.getAddInfoKey(), m_infos.getItemProperty(info).getValue());
                          } else {
                              if (!CmsStringUtil.isEmptyOrWhitespaceOnly(
                                  (String)m_infos.getItemProperty(info).getValue())) {
                                  propUtils.setProperty(
                                      user,
                                      info.getField().name(),
                                      m_infos.getItemProperty(info).getValue());
                              }
                          }
                      }
                  }
                  cms.writeUser(user);
                  afterWrite.run();
              }
          } catch (CmsException | CommitException | IllegalAccessException | InvocationTargetException
          | NoSuchMethodException e) {
              LOG.error("Unable to commit changes to user..", e);
          }
      }
docs: Store fields to given user.<p>
  
  @param user User to write information to
  @param cms CmsObject
  @param afterWrite runnable which gets called after writing user
  @param force force write even if data are not valid