Now I know I may have selected the wrong version number here, but I'm working on a site which is in production and would rather have a fix applied to what is a stable module rather than an unstable version. I've been tasked with creating a view of users with exposed filters of name and email address which displays a table of results with the last column being a "send a message" column with links to send a private message to that user.
This is working as it should apart from it displaying results of users who have disabled private messaging. Although they don't have the link displayed the client requires the list to only include users who have private messaging enabled. There doesn't appear to be a filter for this.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | privatemsg-views-field-filter-pm-is-disabled-2484647-2.patch | 3.32 KB | shaundychko |
Comments
Comment #1
ptmkenny commentedFeatures are only added to the 2.x-dev branch at this point; if a patch is contributed for 2.x, it will then be considered for backporting to 1.x (or you can contribute a 1.x patch if you are writing this functionality yourself).
2.x-dev is basically as stable as 1.x, as it passes all the same tests; it just has additional features (although it is not officially the stable release, so that is a caveat).
There would definitely need to be a filter written to exclude users who have disabled private messaging; the privatemsg code that shows a link does not interact with Views.
Comment #2
shaundychkoI came across the need for this filter in order to bulk message users using VBO and Rules. With this patch the Views list can be filtered to only those users who have private messages enabled. This patch also added it as a field.
Against the 7.x-1.x-dev branch since that's what I happened to be using on the site. I hope it's still useful seeing as the 2.x branch is so similar.
Comment #5
shaundychkoThe test results are strange since they run fine locally. It seems like a problem with the testbot configuration.
Comment #6
ivnishComment #7
andypostComment #8
ivnishAutomatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.