Download & Extend

Add list of blocked users

Project:Privatemsg
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

If you block a user, delete all messages from this user and later (for waterver reason) decide to allow this user to send you messages again, there is no possibility to unblock him. The only way to unblock a user that I know of is to click on a message from this user and then click on the unblock link, but you can't do this, since you have deleted all messages from the blocked user. It would help if there was a list of blocked users from wich you would select a user (or multiple users) to unblock.

Comments

#1

Version:6.x-1.0-rc3» 6.x-1.x-dev

Good idea.

Feel free to start working on the patch. I dont think we need a very complicated UI for this, just a decision where this list will go in user's profile.

#2

I'm afraid I don't have the knowledge or skills to develop Drupal modules and patches. I believe there will be someone more competent who can devote some of his valuable time and knowledge to create this patch :-)

#3

No worries! Your other skills can help us anyway. Please help us find a developer that can help developing this feature. You can post in forum and link back to this issue.

#4

I do have some code lying around that does add such a page (part of something else). I'm just wondering if it should be below /messages or to a /user settings page.

#5

Hi
IMHO the best sense it will be have it will be under messages.
Would be great to have option to notice the reason why you are blocking that user. This message could be shown in the list of blocked users together with his name.

#6

This would also make sense to integrate with User Relationships. I think it would then give you many great stuff for free (such as Views integration and UI).

#7

Better idea: since we are integrating with Rules already, it would then make sense to have Rules events: "Private Messages: user has been blocked", and "Private Messages: user has been unblocked", which provide info who blocked who.
Even while PM is supposed to be fully functional without Rules, it would bring highest flexibility in integration with any custom UI and workflow.

#8

Version:6.x-1.x-dev»
Status:active» needs review

The attached patch adds a new local task to /messages, containing a paged, sortable list of all users someone has blocked. It is possible to unblock a user there or block other users.

AttachmentSizeStatusTest resultOperations
pm_block_user_list.patch3.43 KBIdlePASSED: [[SimpleTest]]: [MySQL] 779 pass(es).View details

#9

Haven't had time to test this. Small note just from reading the patch:
this

<?php
+  return drupal_get_form('pm_block_user_block_user_form') . theme('table', $header, $rows) . theme('pager');
?>

is not really flexible. Would be better to wrap the whole output in some more generic theming function so users could override it.

#10

Updated the patch

- Merged the page and the form and added a basic theme function
- Removed unecessary theme declaration of pm_block_user
- Added some tests for this and pm_block_user in general

AttachmentSizeStatusTest resultOperations
pm_block_user_list2.patch10.59 KBIdlePASSED: [[SimpleTest]]: [MySQL] 943 pass(es).View details

#11

Status:needs review» fixed

Ok...

Commited to 6.x-2.x, ported to 7.x-1.x and commited there and also backported the tests to 6.x-1.x.

This revealed 3-4 bugs in the current 7.x-1.x release, both in pm_block_user.module and privatemsg.module itself. Awesome!

#12

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.