code: public void writeUser(CmsDbContext dbc, CmsUser user) throws CmsException {
  
          CmsUser oldUser = readUser(dbc, user.getId());
          m_monitor.clearUserCache(oldUser);
          getUserDriver(dbc).writeUser(dbc, user);
          m_monitor.flushCache(CmsMemoryMonitor.CacheType.USERGROUPS, CmsMemoryMonitor.CacheType.USER_LIST);
  
          if (!dbc.getProjectId().isNullUUID()) {
              // user modified event is not needed
              return;
          }
          // fire user modified event
          Map<String, Object> eventData = new HashMap<String, Object>();
          eventData.put(I_CmsEventListener.KEY_USER_ID, user.getId().toString());
          eventData.put(I_CmsEventListener.KEY_USER_NAME, oldUser.getName());
          eventData.put(I_CmsEventListener.KEY_USER_ACTION, I_CmsEventListener.VALUE_USER_MODIFIED_ACTION_WRITE_USER);
          eventData.put(I_CmsEventListener.KEY_USER_CHANGES, Integer.valueOf(user.getChanges(oldUser)));
          OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_USER_MODIFIED, eventData));
      }
docs: Updates the user information. <p>
  
  The user id has to be a valid OpenCms user id.<br>
  
  The user with the given id will be completely overridden
  by the given data.<p>
  
  @param dbc the current database context
  @param user the user to be updated
  
  @throws CmsException if operation was not successful