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

civicrm_member_roles_sync_user called when it should not be

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.7, 4.3.8
    • Fix Version/s: 4.4.0
    • Labels:
      None

      Description

      See my forum post for more info: http://forum.civicrm.org/index.php/topic,30246.0.html

      "|| variable_get('civicrm_member_roles_sync_method', 0) == 3" needs to be removed from the if statement. Method "3" is when the user is updated, the function is only called during login or logout. It erroneously causes Rules to fire during a user update event on login/out. Simply delete that line and it fixes the function to work as expected.

      You can replicate this by by enabling the member/roles sync module and rules. Set up a rule to email yourself when a user is updated and some role is added to that user. Add that role to the user, get an email. Logout and you will get that email again, login get another email. Delete the line from above, no email on login or out as expected.

      This seems to have crept in during 4.3.0 as per http://issues.civicrm.org/jira/browse/CRM-10274

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              unclejustin Justin Boyson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: