check friendship

Hi guys. 

i repost my question in a better way.  Which is the function to check if 2 users are friends?

thanks