News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Notification "Bug"

Started by GandalfUFR, July 05, 2006, 07:50:38 AM

Previous topic - Next topic

GandalfUFR

Notification is not working for users with "no primary membergroup" but additional membergroup "Administrator" on boards without "Allowed Groups" because of the following code snippet in "Post.php", SMF 1.0.7, function notifyUsersBoard():


if ($rowmember['ID_GROUP'] != 1)
{
  $allowed = explode(',', $rowmember['memberGroups']);
  ####
  $rowmember['additionalGroups'] = explode(',', $rowmember['additionalGroups']);
  $rowmember['additionalGroups'][] = $rowmember['ID_GROUP'];
  $rowmember['additionalGroups'][] = $rowmember['ID_POST_GROUP'];

  if (count(array_intersect($allowed, $rowmember['additionalGroups'])) == 0)
    continue;
}


Maybe for next version someone could add another line (at ####) like $allowed[]=1; so that Administrators are always part of the "$allowed array" even if they have no primary group membership.

This would fix the notification for new posts in a board. The code snippet for notifications on replies I was not looking for (yet) ...

Advertisement: