]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/LdapService.php
Fixed LDAP error thrown by not found user details
[bookstack] / app / Auth / Access / LdapService.php
index 07e9f7b64e6b4516c53a4aa00f211a56d90598fb..0d6ebfc802aa076d8237fe867afbc5da573f9641 100644 (file)
@@ -102,9 +102,9 @@ class LdapService extends ExternalAuthService
      * Check if the given credentials are valid for the given user.
      * @throws LdapException
      */
-    public function validateUserCredentials(array $ldapUserDetails, string $username, string $password): bool
+    public function validateUserCredentials(?array $ldapUserDetails, string $password): bool
     {
-        if ($ldapUserDetails === null) {
+        if (is_null($ldapUserDetails)) {
             return false;
         }