Browse Source

Better ldap_schema setting detection

Ben Tyger 4 years ago
parent
commit
6a5e6431aa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Controllers/Auth/AuthController.php

+ 1 - 1
app/Controllers/Auth/AuthController.php

@@ -35,7 +35,7 @@ abstract class AuthController extends Controller
             return false;
             return false;
         }
         }
         // Building LDAP URI
         // Building LDAP URI
-        $ldapSchema=array_key_exists('schema', $this->config['ldap']) ?
+        $ldapSchema=(@is_string(['ldap']['schema'])) ?
             strtolower($this->config['ldap']['schema']) : 'ldap';
             strtolower($this->config['ldap']['schema']) : 'ldap';
         $ldapURI="$ldapSchema://".$this->config['ldap']['host'].':'.$this->config['ldap']['port'];
         $ldapURI="$ldapSchema://".$this->config['ldap']['host'].':'.$this->config['ldap']['port'];