We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 686
    • 24 Posts
    Hi,

    I have a snippet that needs to get document fields (such as description, pagetitle etc.) of different documents. Right now I’m using getDocument() for this, but I realised now that it doesn’t work when certain documents are protected.

    Is there a good alternative to using getDocument() to get the values, or will I have to just access the *_site_content table values manually using SQL?

    Thanks

      • 27376
      • 576 Posts
      Documents cannot be edited/retrieved by a user who doesn’t have access to it. This is a security precaution.

      You will have to use direct SQL queries to do so. Make sure that your code is secure if you choose to go this route.