[buddypress-trac] [BuddyPress Trac] #6006: User Types API

buddypress-trac noreply at wordpress.org
Sun Nov 23 13:20:07 UTC 2014


#6006: User Types API
--------------------------+------------------
 Reporter:  boonebgorges  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  2.2
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by imath):

 I've tested :)

 Very interesting work. But IMHO, it might be a bit "frustrating" for some
 users.

 So i can register user types, and go into the "Admin" extended profile to
 set a user to one of the types i've registered : very nice. I can see how
 to use this while building plugins but for regular users : it's a bit
 limited.

 I've seen you are not using {{{get_terms()}}} but a specific
 {{{buddypress()}}} global to store and get the types. So when fetching the
 user types, we don't get the terms count. I think that's the kind of thing
 people would like to know : how many members are from this type ?

 Maybe it's a bit too early, i guess to get the count of 1 type you can do
 a BP_User_Query, but if i want to get the count of each type, you have to
 run as many BP_User_Query as there are types :(

 Without a loop parameter, i find it frustrating because to filter members
 by user types, you need to run the same query 2 times
  1. First to get the user ids to build the include args of
 bp_has_members()
  2. and second when precisely the specific bp_has_members() loop is run.

 Finally i've quickly built a widget and used it in a subsite. It's working
 fine. But if i'm adding the same widget another time, i'm switching blogs
 2 times. Is there a way to avoid this ? Or maybe it's safer to switch
 blogs each time a BP Taxonomy function is used..

 Thanks a lot for this great work :)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6006#comment:13>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list