Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-298

crm_get_group_contacts returns every record duble

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Given below is the code snippet executed in Drupal page:

      <?php

      $group = crm_get_groups($params = array('name' => 'something'));

      $contacts = crm_get_group_contacts(&$group[0], null, 'In', null, 0, 25 );

      foreach( $contacts as $con ) {
      $contact = crm_get_contact( array( 'contact_id' => $con->contact_id ) );
      print $contact->display_name;
      print "<br />";
      }

      ?>

      Runnig this snippet causes CiviCRM API to return the list of contacts right, but every contact in this list is duplicated:

      contact1
      contact1
      contact2
      contact2
      contact3
      contact3
      ...etc...

        Attachments

          Activity

            People

            • Assignee:
              anil Anil Kokitkar
              Reporter:
              mover Michał Mach
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: