Skip to Content Skip to Menu

Trouble getting connection tab through api

  • sfraise
  • sfraise
  • OFFLINE
  • Posts: 96
  • Thanks: 14
  • Karma: 4
13 years 7 months ago - 13 years 7 months 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.
Last edit: 13 years 7 months ago by sfraise.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum