Closed (fixed)
Project:
User Relationships
Version:
6.x-1.0-beta2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
24 Sep 2008 at 03:17 UTC
Updated:
20 Jul 2009 at 20:50 UTC
Can someone give me a pointer on what code I might use in a content template to restrict access to a node based on the relationship one has with the node's author? I just need a hint on the logic/variables I would use to, say, restrict access to a given text field based on their "client" relationship status.
Comments
Comment #1
alex.k commentedYou can look at the user_relationships_load() function. Check the docs for it, as it can run a number of different queries. In your case I'd do something like
You would iterate over all returned relationships, checking if the desired one is present.
or, try this for more precision:
Comment #2
alex.k commentedCleaning up the issue queue.