From 7f9ecb86654fbc3b837f489a0a75f62c1fb4df69 Mon Sep 17 00:00:00 2001 From: JediKev Date: Thu, 16 May 2024 15:15:47 +0000 Subject: [PATCH] ldap: Instance Name This addresses an issue where if you have more than one LDAP instance running it will show "Active Directory or LDAP" for all instances making it hard to differentiate the instances. This updates the `getName()` function to grab the name from the config if available otherwise defaults to the default name. --- auth-ldap/authentication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth-ldap/authentication.php b/auth-ldap/authentication.php index 2f93de8..7cbc2dc 100644 --- a/auth-ldap/authentication.php +++ b/auth-ldap/authentication.php @@ -433,7 +433,7 @@ function authenticate($username, $password=false, $errors=array()) { function getName() { $config = $this->config; list($__, $_N) = $config->translate(); - return $__(static::$name); + return $config->getName() ?: $__(static::$name); } function lookup($dn) {