Allow a relationship type banned so that once a buddy added there he can't submit repeating requests to add as a buddy but same time won't get any previledges associated with other buddies.

Comments

sprsquish’s picture

I think what you're getting at is a way of halting the spamming of relationship requests. If so, I don't think that's something for the module to handle. I don't believe that most people would intentionally relationship-spam other users. If they do they're should probably be more grave consequences than not being able to request the relationship.

I think this is more a problem for the admins of a site. If someone's being relationship-spammed they can contact the admins. The admins can then handle the situation according to their own policies.

ajayg’s picture

> I don't believe that most people would intentionally relationship-spam other users

The problem is bigger than you think. If you have a popoular profile on linkedin or facebook you will realize how many requests you get to be friends with. On a site with thousands of user it is not scalable for admin to handle each and rather would give the control to users how then handle it. I am admin of such a site and considering this module seriously. It is common to have banned status (at each user level) in almost every social networling sites and users are now expecting it. It slows down the growth initially but it is more healthy in the longe term.

The solution I was suggesting is simple since you still allow the person to be part of network so he/she can't keep sending new requests. But not allowing him/her access. If the user later decide to change the role from "banned" to "friend" again he gets access again. This will be also useful for online relationship going sour (which does happen like in real life) and gives the control to user to deal with someone who is not friend anymore.

sprsquish’s picture

Okay, the first time around, I think I may have misinterpreted what you're asking. You're talking about a status flag for relationships. So if Bob and Alice are friends Bob could set a flag on that friendship that flagged it as "non-friend" but wouldn't completely delete the relationship. It'd be easy to implement.

I'm conflicted on what word to use. I think to "ban" someone would mean they no longer have access to your content, but you would still see theirs. To "ignore" someone would be the opposite -- they can still see your content, but you don't see theirs.

Ultimately I don't feel this has any bearing on the core module. However it does carry meaning for a plugin I'm working on that would allow users to control access to their node types based on their relationships. It also might come in handy for others. Perhaps the best way of solving this problem is to create a "flags" field for a relationship and maintain a list of flags that other modules could use.

Let me know what you think about this.

ajayg’s picture

Sorry if I was not clear. You got it right. I meant giving control to each user to dealing with each relationship role.

I am more concerned about the drastic relationship cut where you don't want any contact and don't want to be bothered again. This is when people become desperate and going through admin is not scalable.

Probably what you are thinking is a complete solution and what I have in mind some simple way of marking the person so that person does not keep sending new requests and does not have access to content. So here are possibilities of implmentation.

1) If Alice and Bob are not in talking terms so Alice can just mark this relation "non friend" or move the Bob to a special role (and anybody in that role automatically gets this status)

2) Alice can delete the relationship and as part of delete process adds Bob to a special list. Because Bob in this list he can't send new request to be friends again Alice.

#2 may be probably more easy to implement. Since what content to show what not to show etc is not involved.

ajayg’s picture

solution 2) above also can be used to keep those pesky request to be a friend added to the list. SO there is no need to become friend and delete. Just a request from someone you don't know or no intention to be friends with can go to that list.

sprsquish’s picture

Yes, I definitely understand what you're saying now.

I'm going to roll it into a more generic solution by using a flags column. That way plugins will be able to use it for their own purposes.

On the UI I'll add options in two different places: 1) In the pending list there will be "Approve," "Disapprove," and "Ban." 2) in the current relationships list there will be "Remove" and "Ban."

This way if someone requests a relationship with another the requestee will be able to simply ban the requester. If the relationship already exists either of the parties can ask for a ban instead of a removal.

I think this solves your problem while allowing expansion that wont require modifying the database time and again.

sprsquish’s picture

A relationship now has a "flag" field along with two defined flags: UR_OK, UR_BANNED. The flag field defaults to UR_OK when a relationship is created. Plugins can use the field for whatever they like.

sprsquish’s picture

Just had another request for this feature (http://drupal.org/node/236241) so I wanted to bump it.

I haven't had the time or need to implement this yet. I would be happy to review and probably accept a patch from someone else though.

battochir’s picture

subscribing

Anonymous’s picture

subscribing...

SeanBannister’s picture

+1 Sub

mp’s picture

+1

alex.k’s picture

Status: Active » Postponed

Patches implementing this are welcome... especially for 5.x as this branch is in bugfixes more only. Thanks. I'd be more interested in seeing this implemented for 6.x.

ajayg’s picture

Version: 5.x-2.x-dev » 6.x-1.x-dev
Status: Postponed » Active

Moving this to 6.x branch so we don't need open another issue for 6.x. Alex just took the clue from your post above and the comments above are conceptual so they are equally valid for 6.x

ajayg’s picture

Anybody has given any thoughts or already implemented this and can share?

calefilm’s picture

I found the thread "hide 1 way relationships": http://drupal.org/node/283204 but I like the comments on this thread.

In my case, I want my users to know they are friends... but if User Idiot is annoying User Nice and is blatantly annoying, I want User Nice to click "Block User" instead of "Remove"

And thus, this user has not just been removed but is on User's "Blocked List" underneath "Pending"

Just an idea. Thanks for the modules! Awesome.

mrf’s picture

Closed #249782: provide integration with ignore user module as a duplicate of this issue.

mrf’s picture

Closed #283204: Allow to hide one way relationships as a duplicate of this issue.

mrf’s picture

Status: Active » Postponed (maintainer needs more info)

As far as I can tell the functionality for this already exists, and I see checks for UR_OK and UR_BANNED throughout the module.

So what is the remaining feature request here? A page where we can set this status? Providing a ur specific block link on a user profile page?

ajayg’s picture

Status: Postponed (maintainer needs more info) » Active

There is underlying functionality for programmers but there is no user visible UI to actually mark someone banned.
Instead of "having ban this user" everywhere may be there is a page where you go and add the user you want to ban. The same page can lost all banned user by you since you don't need to see banned user everyday. And offcourse you don't want to see any messages or updates from this user as well. That part needs to be implmented by other modules, but was saying here anyway if there are underlying data structure changes required.
Is this enough information? Please see above for original discussion.

mrf’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Postponed

Sounds good, this won't make it into 6.x at this stage, and I'm setting to postponed until someone wants to submit a patch to solve this.

silinor’s picture

Status: Postponed » Active

Views integration for flags field is good idea. Filter on this field will be helpfull, I quess.

jessehs’s picture

Issue summary: View changes
Status: Active » Needs work
StatusFileSize
new24.69 KB

This patch re-works the way User Relationships handles relationships requests. The way things currently work, when a user denies a request (or "disapproves" it), the record is deleted from the database. Therefore there's no way to track whether someone is abusing the system/spamming. Also it becomes clear to the requester that the requestee does not want a relationship -- not so warm and fuzzy right?

Following Facebook's lead, this patch changes the workflow so that instead of denying a relationship, the requestee chooses "Ignore request", and is informed that "The sender will not know." There is also now a user/%user/relationships/ignored path that shows all ignored requests.

*Warning -- no turning back! This patch adds a new column to the user_relationships table, 'ignored'. Test with caution on a backup site.*

This is a work in progress, as I have not even looked at whether it breaks any/all of the tests. I also have not tested all of the views integration that it adds. (New filter, field, argument.)

I'm also working with a very heavily patched copy of user_relationships. You must patch the module with some (?) or all of the following patches in order for this to apply. (Or add this to your drush make file.)

projects[user_relationships][download][branch] = "7.x-1.x"
projects[user_relationships][download][revision] = "593d202"
; Machine names: https://drupal.org/node/1980610#comment-7994549
projects[user_relationships][patch][] = "https://drupal.org/files/user-relationships-machine-name-1980610-08.patch"
; Features exportable: https://drupal.org/node/691034#comment-7998557
projects[user_relationships][patch][] = "https://drupal.org/files/user-relationships-features-691034-17.patch"
; Views actions: https://drupal.org/node/409432#comment-8551703
projects[user_relationships][patch][] = "https://drupal.org/files/issues/user-relationships-views-actions-409432-169.patch"
; User permission warning: https://drupal.org/node/2194069#comment-8473565
projects[user_relationships][patch][] = "https://drupal.org/files/issues/user-relationship-hook-permissions-2194069-01.patch"
; User permission privatemsg screening connections
; https://drupal.org/node/2273647#comment-8809663
projects[user_relationships][patch][] = "https://drupal.org/files/issues/user_relationships_privatemsg_alter_hook-2273647-1.patch"
jessehs’s picture

This fixes a bug where ignored requests weren't counted on the title of the "Sent requests" tab that the sender sees.

jessehs’s picture

This patch adjusts the same line as the last one. Turns out that ignored requests should be counted for the Sender but not for the receiver.