isFriendOf() публичный Метод

Determines whether or not this user is another user's friend
public isFriendOf ( integer $user_guid ) : boolean
$user_guid integer The GUID of the user to check against
Результат boolean
Пример #1
0
 /**
  * checks if the user can add a friend
  * @param ElggUser $user
  * @return boolean
  */
 public static function canAddFriend(ElggUser $user)
 {
     if (!isloggedin()) {
         return FALSE;
     }
     if ($user->getGUID() == get_loggedin_user()->getGuid()) {
         return FALSE;
     }
     if ($user->isFriendOf(get_loggedin_user()->getGuid())) {
         return FALSE;
     }
     return TRUE;
 }