The User Relationships module allows users to create named relationships between each other.

Relationship Types

Relationship types are defined by an administrator at: Administer > User Management > Relationships (for D7: admin/config/people/relationships).

Relationship types have a name, a plural name, a time-out, an auto approve designation and a directionality. The name can be anything. The time-out is the amount of time a request stays active. For example, if it's set to 30 days and a user requests a relationship with another user and that user doesn't accept or deny the request within 30 days the request will be dropped.

If auto approve is set, the system skips the request->approve/deny process and simply creates the relationship. An application of this might be the relationship type "subscriber." You don't necessarily need to approve of me subscribing to you.

Directionality

two-way

An example of a two-way relationship may be "friends." If you're my friend I'm your friend. This is the default for new relationships created with User Relationships.

one-way

One-way relationships may be something like "manager", "teacher", "follower" or "stalker". You may be my manager, but I can not be your manager at the same time. By default when a one way relationship is created it cannot be reciprocated (like the manager example above).

If you would like the user to be able to create a second one-way relationship in the opposite direction (you follow me, I follow you back) then ensure that the "this relationship can be reciprocated" checkbox is checked.

Workflow

A user can request a relationship by visiting another user's profile and clicking the request relationship link. (User Permissions must be granted before these links appear.) They can view a list of all their relationships, specific types of relationships or their pending relationship requests by visiting their own profile. Within "pending relationships" they can approve, deny or cancel a request (approve or deny if requested by another user, cancel if their request of another user).

Developers

Developers (both module and theme) are given a wide array of API functions with which they can build additional functionality.

Themers

Theme developers should look at user_relationships_theme.inc for all the theme functions that are used throughout the core module. Anything created by plugin modules will be discussed in their relevant section.

External Resources