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

CiviGroup Roles Sync does not trigger sync on Drupal user login

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.2
    • Fix Version/s: 4.3.4
    • Labels:
      None

      Description

      When a user has been added to a CiviCRM group using an API or smart group, then the next time they login to drupal (with their uf matched drupal account) their Drupal role should be updated per the CiviGroup Roles Sync module.

      Although there is a bug in the code which prevents this:

      civicrm_group_roles.module
      85 $contactid = civicrm_api('uf_match', 'getvalue',array('version' => 3, 'uf_id' => $user->uid, 'return' => 'contact_id'));
      86
      87 if (empty($contact))

      { 88 return; 89 }

      Line 87 should be:
      87 if (empty($contactid)) {

      There is no variable $contact in this function and this function will always return true and not finish.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              brian@grooveinteractive.com Brian Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified