The user relationship module can be used to create relationships between users on your drupal site. In this example we’ll be creating a single relationship called “Friends”. Requirements:
Go to http://drupal.org/project/user_relationships and download the module and place it in sites/all/modules folder.
Then enable the required modules at Administer >> Site building >> Modules.
Make sure you enable the following modules:
Next let's create a relationship type. To keep this tutorial simple let’s create a single relationship type called “Friend”.
Go to Administer >> User management >> Relationships and click on Add type.
Enter in the name friend and plural name friends. Keep requires approvalticked and tick the authenticated user check box in the role access. Then click on submit.
The standard way of friending a user will be to go to their profile page (user/1) and click on a link on that page.
Go to Administer >> User management >> Permissions and set them up as the following:
Now we should test if we can become friends with other users, if you are logged on as admin go to another users profile page. You should see a Become name's friend link.
If you are not seeing the link there could be 2 problems:
Now let's setup the friend request and approval emails. Go to Administer >> User management >> Relationships >> Settings. Scroll down to the Email Options field set, all emails are selected to be sent by default.
Let's be nice to our users and only have the request and approval email sent.
That's it, now you should have a simple friends system on your drupal site using the user relationships module. If anyone has any problems please comment below.
Get in touch and tell me about the role or what you're building.