function isApplicableonFriend($accesserid, $ownerid) { //check rule applicable on friend if yes than return true if ($this->aclparams->get('acl_applicable_to_friend', 1) == true) { return true; } //check accesser is friend of resource owner, //if they are friend then do not apply rule $isFriend = XiptAclHelper::isFriend($accesserid, $ownerid); if ($isFriend) { return false; } return true; }