We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 727
    • 502 Posts
    Can I use this table for anything I want?

    I want to use the OnBeforeWebLogin to search another database outside of MODx and then set/clear flags in the MODx database, so I can then use those flags in snippets. Kind of like a permissions system. This table seems perfect for this purpose. But does anything else use it?

    Andy
    • No, a look at the database after a fresh install shows the table is empty, and even after some heavy development, testing and addition of a lot of "stuff" it’s still empty.

      Why does it matter if anything else uses it? You set its values to whatever you want, and if anything else is using it they will be going after their values, not yours.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 727
        • 502 Posts
        It matters if there is code out there that uses the table and doesn’t take into account that some of the data might not belong to them. For example if I start filling it with things, will something break elsewhere?

        I’ll give it a try and see what happens. Worst case I can always add my own table. Thanks!

        Andy
        • Well, so far nothing is using it, as far as I know.

          I’m considering using it for a few things myself, but will of course always be using queries with relevant "where" clauses to pick out my data. I’ll also put a bit of thought into the value I use for the "setting_name" so that it won’t be getting mixed up with anything else.

          The same thought goes into my snippet variable names and HTML class names and tag IDs so my variables and tags won’t be conflicting with anybody else’s.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org