Trouble getting connection tab through api

13 years 1 month ago - 13 years 1 month ago #156843 by sfraise
Actually, what I need to do is pull the connection data and tweak it to display "$ mutual friends" in a member search component I'm building.

I tried the $cbUser->getTab() method but got nothing, I also tried displaying it as a field but no dice. I'm guessing this doesn't work because you're not viewing a profile as I'm guessing it's dependent on the user id of the profile the person is viewing.

So that leads me into my question, how can I call the connection data from outside the profile system based on the id of the search result? I considered just doing a regular mysql select but that seems a bit messy and would much rather handle it through the api if possible.

I would think that I can just run 2 queries, one that get's $myId's friends and one that get's $id's friends, set up a var to autoincrement in a loop like $myf[i++], and then run an if statement to find the mutual friends count between the two users. I just don't want to build a heavy query if there's a more efficient way to do it.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.144 seconds

Facebook Twitter LinkedIn