It seems that after a user removes a message type in the notifications message section for a space that users still receive emails of that type.
This is easily tested by removing the updated type for a user and then updating any node in a space and selecting to notify that user. They will still receive an email notifying them of the updated node even though they have selected not to.
I tracked this down to an oversight in
oa_messages.module
line 195 in oa_messages_determine_user_notifiers function
// Otherwise, check if the specific message type is enabled for the space
elseif (isset($settings[$space_id]['messages'][$message->type])) {
If the user has saved settings the $message->type will exist and be set to 0
a simple fix is to add a test for the empty state
// Otherwise, check if the specific message type is enabled for the space
elseif (isset($settings[$space_id]['messages'][$message->type]) && !empty($settings[$space_id]['messages'][$message->type])) {
As far as I can tell this issue is still present in all versions of oa although I am only testing on 7.x-2.33
Thanks
Comments
Comment #2
mpotter commentedSince !empty also does an isset, I think this is even easier to fix. Did it in commit 8fcb636 for oa_core. Thanks for the report.