code: public void writeUser(CmsRequestContext context, CmsUser user) throws CmsException, CmsRoleViolationException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              CmsRole role = CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParentOrganizationalUnit(user.getName()));
              checkRoleForUserModification(dbc, user.getName(), role);
              m_driverManager.writeUser(dbc, user);
          } catch (Exception e) {
              dbc.report(null, Messages.get().container(Messages.ERR_WRITE_USER_1, user.getName()), e);
          } finally {
              dbc.clear();
          }
      }
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 context the current request context
  @param user the user to be updated
  
  @throws CmsRoleViolationException if the current user does not own the rule {@link CmsRole#ACCOUNT_MANAGER} for the current project
  @throws CmsException if operation was not successful