We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20178
    • 82 Posts
    I have a client that would like to be able to search through users data - im just wondering the best way to go about this all.. this is using revolution.

    I’m thinking using login is the way to go - candidates register - then update their profile -
    i have managed to get the basis of this up and running pretty quickly.

    this all seems faily simple - now what my client would like to be able to do is to search the users or candidates based upon certain criteria within their profile. what would the best way to go aobout searching user data and outputting users that meet multiple criteria?

    thanks,

      • 25308
      • 46 Posts
      Quote from: monsterwatt at Feb 07, 2011, 03:28 PM

      I have a client that would like to be able to search through users data - im just wondering the best way to go about this all.. this is using revolution.

      I’m thinking using login is the way to go - candidates register - then update their profile -
      i have managed to get the basis of this up and running pretty quickly.

      this all seems faily simple - now what my client would like to be able to do is to search the users or candidates based upon certain criteria within their profile. what would the best way to go aobout searching user data and outputting users that meet multiple criteria?

      thanks,



      Hi Monsterwatt, I’m trying to do the same thing at this moment. I’m still fairly new to the inner workings of modx but I’ve had it explained to me that the best way to do this would be with a custom manager form. I’ve been reading up on the documentation to see if I can write a custom snippet for this process. I’m kinda going the extra step in this process to be let another user group "admins" to pull up user information and edit it as well. If I"m successful I’ll send it your way. However if you find a solution as well could you let me know?

      Thanks,
      ~RL
        • 42146
        • 73 Posts
        I'm looking to do the same thing once i have the user profiles all set up with all the fun custom user fields with login and peoples.

        Did anyone find a good working solutions?
          • 36695
          • 47 Posts
          Not sure how helpful my answer is going to be as it is quite involved. However, it does work!
          The "extended fields" of the modUser object make querying them using the power of the database quite tricky. Unless you get into matching strings within the JSON field (which is how the extended fields are stored) you need to do all the filtering/searching etc in php. I had a lot of extra user data to store and a need to search it efficiently.
          The answer was to extend the modUser object (see http://rtfm.modx.com/display/revolution20/Extending+modUser) which gives you an extra table with all the info in a lovely queryable format.
          Then create a CMP: I used CMPGenerator extra then picked apart the http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution tutorial to get the actual page working. The full power of getCollectionGraph et al is then available to you through your processors.
          This isn't really meant as an answer - more of a suggestion for a direction of travel. If you need more info on any of the above just shout.