#11993 Fix notifications mesagge token

This commit is contained in:
miguel angel rasteu 2023-09-07 14:16:36 +02:00
parent 57fc1aaf85
commit 82bef687e1
1 changed files with 6 additions and 0 deletions

View File

@ -635,6 +635,12 @@ function notifications_get_user_label_status($source, $user, $label)
array_keys(users_get_groups($user)),
array_keys(notifications_get_group_sources_for_select($source['id']))
);
// Clean default common groups error for mesagges.
if ($common_groups[0] === 0) {
unset($common_groups[0]);
}
// No group found, return no permissions.
$value = empty($common_groups) ? false : $source[$label];
return notifications_build_user_enable_return($value, false);