code: public void setUsersOrganizationalUnit(CmsRequestContext context, CmsOrganizationalUnit orgUnit, CmsUser user)
      throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              checkRole(dbc, CmsRole.ADMINISTRATOR.forOrgUnit(orgUnit.getName()));
              checkOfflineProject(dbc);
              m_driverManager.setUsersOrganizationalUnit(dbc, orgUnit, user);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(Messages.ERR_SET_USERS_ORGUNIT_2, orgUnit.getName(), user.getName()),
                  e);
          } finally {
              dbc.clear();
          }
      }
docs: Moves an user to the given organizational unit.<p>
  
  @param context the current request context
  @param orgUnit the organizational unit to add the principal to
  @param user the user that is to be move to the organizational unit
  
  @throws CmsException if something goes wrong
  
  @see org.opencms.security.CmsOrgUnitManager#setUsersOrganizationalUnit(CmsObject, String, String)