From 45f834ff2e56af9ec0f2359c9899fa8dc2c9600f Mon Sep 17 00:00:00 2001 From: LordFelius <95199533+LordFelius@users.noreply.github.com> Date: Fri, 17 Dec 2021 17:55:22 +0800 Subject: [PATCH] fixed LDAP_GROUP_MEMBERSHIP_USES_UID not working (#133) should use string == 'TRUE' instead of == TRUE , as getenv returns a string , which always considered equaling a bool TRUE . --- www/includes/config.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/includes/config.inc.php b/www/includes/config.inc.php index 4dcf4c5..162a7a4 100644 --- a/www/includes/config.inc.php +++ b/www/includes/config.inc.php @@ -35,8 +35,8 @@ if (getenv('LDAP_GROUP_MEMBERSHIP_ATTRIBUTE')) { $LDAP['group_membership_attribute'] = getenv('LDAP_GROUP_MEMBERSHIP_ATTRIBUTE'); } if (getenv('LDAP_GROUP_MEMBERSHIP_USES_UID')) { - if (strtoupper(getenv('LDAP_GROUP_MEMBERSHIP_USES_UID')) == TRUE ) { $LDAP['group_membership_uses_uid'] = TRUE; } - if (strtoupper(getenv('LDAP_GROUP_MEMBERSHIP_USES_UID')) == FALSE ) { $LDAP['group_membership_uses_uid'] = FALSE; } + if (strtoupper(getenv('LDAP_GROUP_MEMBERSHIP_USES_UID')) == 'TRUE' ) { $LDAP['group_membership_uses_uid'] = TRUE; } + if (strtoupper(getenv('LDAP_GROUP_MEMBERSHIP_USES_UID')) == 'FALSE' ) { $LDAP['group_membership_uses_uid'] = FALSE; } } $LDAP['require_starttls'] = ((strcasecmp(getenv('LDAP_REQUIRE_STARTTLS'),'TRUE') == 0) ? TRUE : FALSE);