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

CRM_Utils_System_Drupal8::authenticate() is incomplete

    Details

    • Type: Task
    • Status: In Progress
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.27
    • Fix Version/s: None
    • Component/s: None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      CRM_Utils_System_Drupal8::authenticate() is pretty incomplete and needs work

      For example:

      1. It always bootstraps the Drupal, even if $loadCMSBootstrap is FALSE
      2. It doesn't actually change to requested user according to Drupal, it only returns the IDs.
      3. Looking at what the Drupal 7 implementation does, it's just missing lots of the logic/features there

      Point 2 above is particularly important, because it means that scripts calling CRM_Utils_System::authenticateScript() won't get the requested user as far as Drupal is concerned. This is breaking the Drupal civicrm_cron module with CiviMail's 'process_mailing' cron job.

      Given all the stuff that's broken or potentially missing in the method, I'm going to start with a minimal PR just to get it working enough to support civicrm_cron and CiviMail, but then leave this PR around to fill in the rest of the stuff!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dsnopek David Snopek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: