How can I get category's special users


  • Gamers

    I mean users I added one by one in category like below:

    QQ20150802-1@2x.jpg

    I just want to show these master users in home's categories list.

    Thanks!



  • This post is deleted!

  • Staff Admin

    Those userrs are stored in groups with special names, here are the names assuming the category id is 1.

    cid:1:privileges:find
    cid:1:privileges:read
    cid:1:privileges:topics:create
    cid:1:privileges:topics:reply

    You can get the user ids from these groups by.

    Groups.getMembers('cid:1:privileges:find', 0, -1, callback); This will give you all the user ids that have the find permission for category 1.

    If you want to get their basic info like username picture slug so you can show user icons you can just use Groups.getMemberUsers('cid:1:privileges:find', 0, -1, calllback);


Log in to reply
 

Suggested Topics

| |