User Relationship Rules / Or Role Dependent

Events happening in the community are now at Drupal community events on www.drupal.org.
Hoeven's picture

Hello,
Is there a way to (relatively easy) make a user relationship based on the role a user has? For example users which have role A can become friends with everyone who is role A but not with role B. Simple question but hard to find any answers.

Thanks so much!

Comments

Maybe you'd already found

sadist's picture

Maybe you'd already found your solution. But just to answer this for those people who might need it, YES you can.

User_relationships.module supports Role.module

You just create the type of relationship in UR, and set it only Role A are able to create that relationship in Permission settings.

@Sadist this could be helpful

todd zebert's picture

@Sadist this could be helpful to me - which "Role.module"? I can't find any other reference to this functionality, nor do I see the ability to set permissions on relationship types.

Thanks!

Hi Todd, I was referring to

sadist's picture

Hi Todd, I was referring to the core role module (admin/user/roles).

Create 2 roles, set the user_relationships permission to it. Then go to UR admin and try adding new types of relationships (admin/user/relationships/add). Here, you'll be able to see Role request access and Role receive access.

So here, you may create Relationships type A for User Role-A, create another type B for User Role-B and so on.

Social Networking Sites

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: