We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7045
    • 225 Posts
    Forgive me if this has been covered, as I didn’t find anything. It there a way, maybe a down and dirty snippet, that will allow me display how many users have registered with a particular site. I am using the Login snippet for registration, login, etc.

    Thanks in advance
      • 7045
      • 225 Posts
      This is in Revo, my bad.
        • 7045
        • 225 Posts
        Incase there is some confusion, here is an example:

        We have XXXX active members on our site!

        I need to know how to calculate the XXXX.
          • 28215
          • 4,149 Posts
          Create a snippet called ActiveUserCount:

          return $modx->getCount('modUser',array('active' => true));


          Then in your page:

          There are [[!ActiveUserCount]] active users!
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 7045
            • 225 Posts
            That is exactly what I was looking for, thanks.