diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php index aa49f5f..f458ffe 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php @@ -134,11 +134,12 @@ public function authenticate(Request $request) { * The default provider is the one with the lowest registered priority. * * @return string - * The ID of the default provider + * The ID of the default provider. */ protected function defaultProviderId() { $providers = $this->getSortedProviders(); - return $providers[end(array_keys($providers))]; + $provider_ids = array_keys($providers); + return end($provider_ids); } /** diff --git a/core/lib/Drupal/Core/Authentication/Provider/Cookie.php b/core/lib/Drupal/Core/Authentication/Provider/Cookie.php index 04a6992..ae108dc 100644 --- a/core/lib/Drupal/Core/Authentication/Provider/Cookie.php +++ b/core/lib/Drupal/Core/Authentication/Provider/Cookie.php @@ -51,16 +51,6 @@ public function cleanup(Request $request) { * {@inheritdoc} */ public function handleException(GetResponseForExceptionEvent $event) { - $exception = $event->getException(); - if (user_is_anonymous() && $exception instanceof AccessDeniedHttpException) { - $event->setResponse(new RedirectResponse(url('user/login', array( - 'absolute' => TRUE, - 'query' => array( - 'destination' => $event->getRequest()->get('system_path'), - ), - )))); - return TRUE; - } return FALSE; } }