Skip to content
Snippets Groups Projects
Commit 8e053a52 authored by Matthew Slater's avatar Matthew Slater
Browse files

basic_auth module was assumed

parent 25529b86
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
/**
* Modifies Drupal's services
* Modifies basic auth service to accept other usernames.
*/
class AltLoginServiceProvider extends ServiceProviderBase {
......@@ -14,8 +14,9 @@ class AltLoginServiceProvider extends ServiceProviderBase {
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$container->getDefinition('basic_auth.authentication.basic_auth')
->setClass('Drupal\alt_login\Authentication\Provider\BasicAuth');
if ($def = $container->getDefinition('basic_auth.authentication.basic_auth')) {
$def->setClass('Drupal\alt_login\Authentication\Provider\BasicAuth');
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment