Author Topic: Max number of group members - bug  (Read 3247 times)

Offline mikeloco

  • Newbie
  • *
  • Posts: 6
Max number of group members - bug
« on: January 07, 2015, 05:08:59 AM »
Hi,
I am able to add new contact in a group even though I limited this in a configuration file $config['max_group_members'] = 10;

The problem is in a program\steps\addressbook\save.inc row 228:
Code: [Select]
if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum))
    $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
$CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']);

If I add else, the problem is solved

Code: [Select]
if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($counts->count + 1 > $maxnum))
    $OUTPUT->show_message('maxgroupmembersreached', 'warning', array('max' => $maxnum));
else
    $CONTACTS->add_to_group($plugin['group_id'], $plugin['ids']);

Is it possible to resolve this in a feature release?

BR,
Miodrag

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Max number of group members - bug
« Reply #1 on: January 07, 2015, 10:21:07 AM »