diff options
Diffstat (limited to 'lib/private/LDAP/NullLDAPProviderFactory.php')
-rw-r--r-- | lib/private/LDAP/NullLDAPProviderFactory.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/private/LDAP/NullLDAPProviderFactory.php b/lib/private/LDAP/NullLDAPProviderFactory.php new file mode 100644 index 00000000000..60588e4d15b --- /dev/null +++ b/lib/private/LDAP/NullLDAPProviderFactory.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OC\LDAP; + +use OCP\IServerContainer; +use OCP\LDAP\ILDAPProviderFactory; + +class NullLDAPProviderFactory implements ILDAPProviderFactory { + public function __construct(IServerContainer $serverContainer) { + } + + public function getLDAPProvider() { + throw new \Exception('No LDAP provider is available'); + } + + public function isAvailable(): bool { + return false; + } +} |