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

hook_civicrm_post function called with 'edit' operation when creating a new Individual

    Details

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

      Description

      When creating a new contact via Drupal's register function the hook_civicrm_post() function call for the Individual is called with 'edit' operation when it should be a 'create' function. The hook_civicrm_pre() function is called correctly.

      Can be reproduced with a simple drupal module with the _civicrm_pre() and _civicrm_post() functions and log the calls. When creating a new account in Drupal the following is called (in order):

      function operation objectName
      -----------------------------------------
      _civicrm_validate
      _civicrm_pre create Profile
      _civicrm_pre create Individual
      _civicrm_post edit Individual
      _civicrm_post create Profile
      _civicrm_validate
      _civicrm_pre edit Profile
      _civicrm_pre edit Individual
      _civicrm_post edit Individual
      _civicrm_post edit Profile

        Attachments

          Activity

            People

            • Assignee:
              sunil Sunil Pawar
              Reporter:
              mjlucas James Lucas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: