Skip to content

Commit

Permalink
dev/drupal#149 Override sessionStart function for Drupal8 using appro…
Browse files Browse the repository at this point in the history
…priate session functions

Use Drupal Session service and don't worry about calling migrate
  • Loading branch information
seamuslee001 committed Nov 27, 2020
1 parent 2e68206 commit 592e730
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CRM/Utils/System/Drupal8.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,4 +835,16 @@ public function getCMSPermissionsUrlParams() {
return ['ufAccessURL' => \Drupal\Core\Url::fromRoute('user.admin_permissions')->toString()];
}

/**
* Start a new session.
*/
public function sessionStart() {
if (\Drupal::hasContainer()) {
$session = \Drupal::service('session');
if (!$session->isStarted()) {
$session->start();
}
}
}

}

0 comments on commit 592e730

Please sign in to comment.