We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I’m working on a plugin that requires a login to an external system with a special account. Trying to determine where & how I should store the password. A plugin property seems like the best place, except that I’d have to store it in clear text. I suppose I could generate a hash and store that in a property, then decode it in the plugin. Seems like the ideal would be if there were an option to use type "password" on a property or system setting... but there currently doesn’t seem to be such an option.

    Thoughts?
      • 3749
      • 24,544 Posts
      If it will only be used by that plugin, the plugin property is probably the best place. If it will be used elsewhere, it could still go there , but it might be better as a setting. It could be a System Setting or a Context Setting, but I think I would probably make it a User Setting for the admin Super User. That way it would be available with $modx->getOption(), but only in the Admin’s sessions.

      In any case, you definitely want to store a hash value, not the password itself.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting