code: public static CmsObject initCmsObject(CmsObject adminCms, CmsContextInfo contextInfo) throws CmsException {
  
          return OpenCmsCore.getInstance().initCmsObject(adminCms, contextInfo);
      }
docs: Returns an initialized CmsObject with the user and context initialized as provided.<p>
  
  Note: Only if the provided <code>adminCms</code> CmsObject has admin permissions,
  this method allows the creation a CmsObject for any existing user. Otherwise
  only the default users 'Guest' and 'Export' can initialized with
  this method, all other user names will throw an Exception.<p>
  
  @param adminCms must either be initialized with "Admin" permissions, or null
  @param contextInfo the context info to create a CmsObject for
  
  @return an initialized CmsObject with the given users permissions
  
  @throws CmsException if an invalid user name was provided, or if something else goes wrong
  
  @see org.opencms.db.CmsDefaultUsers#getUserGuest()
  @see org.opencms.db.CmsDefaultUsers#getUserExport()
  @see OpenCms#initCmsObject(CmsObject)
  @see OpenCms#initCmsObject(CmsObject, CmsContextInfo)
  @see OpenCms#initCmsObject(String)