1. 07 Nov, 2019 2 commits
  2. 29 Oct, 2019 4 commits
  3. 24 Sep, 2019 1 commit
  4. 18 Sep, 2019 2 commits
  5. 23 Aug, 2019 1 commit
  6. 21 Aug, 2019 3 commits
  7. 02 Jul, 2019 1 commit
    • Tim Otten's avatar
      civicrm.user.inc - Fix crash when creating user via drush CLI · d995cd27
      Tim Otten authored
      For test/triage/demo sites, we must generate a couple user accounts via drush CLI, e.g.
      
      ```
      cv core:install --cms-base-url="$CMS_URL" --plugin-path ~/src/d8plg -f
      drush8 en civicrm
      drush8 -y user-create --password="$DEMO_PASS" --mail="$DEMO_EMAIL" "$DEMO_USER"
      ```
      
      This addresses a crash.
      
      Before
      ------
      
      The `user-create` step crashes while handling `civicrm_user_insert()`.
      Specifically, the call to `\CRM_Core_BAO_UFGroup::getEditHTML()` fails
      because the D8 CLI environment doesn't have an active session.
      
      After
      -----
      
      `civicrm_user_insert()` only calls `UFGroup::getEditHTML()` if it's
      likely the user-insertion occured on a relevant web-form.
      
      Technical Details
      -----------------
      
      The technique is ported from the CiviCRM-D7 module. In particular,
      `civicrm_on_user_page()` is copied verbatim; and in both cases,
      `civicrm_user_insert()` calls `civicrm_on_user_page()` to decide whether
      `getEditHTML()` will run.
      
      The overall call-path in the D7 module is *slightly* different.
      
      * D7: `civicrm_user_insert()` => `civicrm_register_data()` => `getEditHTML()`
      * D8: `civicrm_user_insert()` => `getEditHTML()`)
      
      ... but the substance of the test is similar.
      d995cd27
  8. 28 Jun, 2019 1 commit
    • Tim Otten's avatar
      Migrate CivicrmHelper::parseUrl() to CRM_Utils_System_Drupal8::parseUrl() · 5a42eee4
      Tim Otten authored
      This fixes a bug which manifests during CLI installation. It corrects a dependency issue.
      
      Before
      ------
      
      Consider this sequence from `cv core:install` docs. (For simplicity/legibility, the example
      is minimalist.)
      
      ```
      $ cv core:install --cms-base-url=http://example.com/
      $ drush -y en civicrm
      ```
      
      Towards the end of the `core:install` step, it rebuilds the menu and winds
      up calling some `url()` functions.  But that crashes on running
      `CivicrmHelper::parseUrl()` -- because `CivicrmHelper` lives under the
      `civicrm-drupal` module, and Drupal hasn't brought the module online yet.
      
      After
      -----
      
      That crash does not happen.
      
      Technical Details
      -----------------
      
      You might wonder: Will this be a flip-floppy problem?  Perhaps there's some
      dataflow through `drupal/core => civicrm-drupal/src/Routing/Routes.php`
      where the new call to `CRM_Core_Config::singleton()->userSystem->parseUrl()`
      cannot be processed because `civicrm-core` isn't available yet?
      
      This hypothetical can be dispensed by reading `src/Routing/Routes.php`.  The
      function already begins with `\Drupal::service('civicrm')->initialize();`,
      which boots all the core Civi services (like
      `CRM_Core_Config::singleton()->userSystem`).  The system is already online
      before the relevant code is called.
      5a42eee4
  9. 22 Mar, 2019 2 commits
  10. 11 Dec, 2018 1 commit
  11. 30 Nov, 2018 1 commit
  12. 29 Nov, 2018 1 commit
  13. 27 Nov, 2018 1 commit
  14. 26 Nov, 2018 1 commit
  15. 31 Oct, 2018 1 commit
    • Wannes De Roy's avatar
      Sync user without logout · e2480221
      Wannes De Roy authored
      Call the synchronizeUFMatch directly instead of the synchronize method. Thus avoiding the session reset of the current user.
      e2480221
  16. 30 Oct, 2018 1 commit
  17. 13 Sep, 2018 1 commit
  18. 03 Sep, 2018 1 commit
  19. 30 Aug, 2018 1 commit
  20. 28 Aug, 2018 3 commits
  21. 27 Aug, 2018 1 commit
  22. 24 Aug, 2018 5 commits
  23. 23 Aug, 2018 1 commit
  24. 22 Aug, 2018 3 commits