hi, here's a patch for pm_block_user that adds a function to determine if a user may write a message to another user
* less code for you to maintain
* api for developers/themers to determine if a user is blocked or not
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | pm-is-user-blocked-dev.patch | 1.14 KB | black silence |
| pm-is-user-blocked.patch | 1.96 KB | black silence |
Comments
Comment #1
berdirThe hooks has changes, so this needs to be re-rolled and probably support multiple recipients.
Comment #2
black silence commentedre-patched for current dev
the part with less code is now irrelevant, but it's still an api for other modules
Comment #3
berdirHm, not sure.
You can use privatemsg_get_link, which will return an URL if you are allowed to send a message to someone. The difference is, that privatemsg_get_link() does not only use pm_block_user but it does also check all permissions and any other modules that might implement hook_privatemsg_block_message().
http://blog.worldempire.ch/api/function/privatemsg_get_link
Also, this does not check the new rule-based configuration options, so I'm setting this to won't fix, feel free to re-open if you disagree.