Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 7170b30

Browse files
committed
Small cleanup.
1 parent 3b0e57d commit 7170b30

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/AdldapAuthServiceProvider.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,12 @@ public function boot()
3131
$config => config_path('ldap_auth.php'),
3232
]);
3333

34-
$auth = Auth::getFacadeRoot();
35-
36-
if (method_exists($auth, 'provider')) {
37-
$auth->provider('ldap', function ($app, array $config) {
38-
return $this->makeUserProvider($app['hash'], $config);
39-
});
40-
} else {
41-
$auth->extend('ldap', function ($app) {
42-
return $this->makeUserProvider($app['hash'], $app['config']['auth']);
43-
});
44-
}
34+
// Register the lDAP auth provider.
35+
Auth::provider('ldap', function ($app, array $config) {
36+
return $this->makeUserProvider($app['hash'], $config);
37+
});
4538

39+
// Register the import command.
4640
$this->commands(Import::class);
4741
}
4842

0 commit comments

Comments
 (0)