We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42042
    • 140 Posts
    Hi all,

    I'm trying to show random users depending on the resource group. I have a couple of users which I show trough the extra Peoples.

    [[Peoples? 
    	&limit=`3` 
    	&tpl=`C.tmpl.user`
    	&usergroups=`marketing`
    ]]	
    


    The only thing I need is to get random users. I've tried &sortBy=`rand()` and &sortBy=`random` but it doesn't work. Can't find anything in the docs.

    Anyone has some tips to get me in the right direction?
      • 37105
      • 194 Posts
      Hi Ilja-web,

      It is possible with pdoUsers which comes with extra pdoTools. See https://docs.modx.pro/en/components/pdotools/snippets/pdousers for the documentation.
      With this snippet it is possible to show a list of users sorted randomly.

        Codeplaza Webdesign: for professional websites at low cost