To create a random CB user module, I use the
Community Builder Online module
1/ I have created a field cb_random for all users (not visible in profile)
2/ With the plugin CB Auto Actions, I run the SQL request :
Code:
UPDATE #__comprofiler SET cb_random = FLOOR(RAND() * (1000 - 1 + 1)) + 1
with trigger OnUserAfterProfileDisplay
which define a random number into field cb_random
3/ On the
Community Builder Online module settings,
I set Display Mode = Custom Latest
on User-text field, you can display what you want with substitutions : [avatar] [firstname] etc..
>Tab Custom Latest
Field : cb_random
Direction : Ascending
Result : the module display user whom have the smallest number in its cb_random field, and each time a profile is viewed, the cb_random change !
I don't know if this system use a lot of ressources, but for my database (500 users), it works!