Details
-
Type: Task
-
Status: In Progress
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.7.27
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
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:
- It always bootstraps the Drupal, even if $loadCMSBootstrap is FALSE
- It doesn't actually change to requested user according to Drupal, it only returns the IDs.
- 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!