We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37108
    • 80 Posts
    I'm looking at extending modUser and have found how to register a user under a custom class key, but do not see how to access one from Login.Profile. Is it possible?
      • 3749
      • 24,544 Posts
      There's no property for setting the class key, but the Profile snippet just gets the user object and its profile and uses toArray() to set all possible placeholders. If the class extends modUser and has a 'Profile' related object alias, I think the Profile snippet will work for you. The UpdateProfile snippet may work as well.
        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
        • 37108
        • 80 Posts
        Hi Bob, thanks for your suggestion. I'm not sure I follow how it would work though. Considering that Login.Profile is building its queries from modUser, it would not know about any extending classes ... right?
          • 3749
          • 24,544 Posts
          I know that queries for modResource will get objects that extend that class such as modWebLink, modStaticResource, Article, etc., so I'm thinking a query for modUser may get your class.

            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