From 5b8cbe29e182c691fa71911bdee403610bda2978 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 27 Aug 2018 14:51:37 -0700 Subject: [PATCH] Possible fix for #5054 - OpenLDAP (non-AD) LDAP users being deactivated --- app/Console/Commands/LdapSync.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 4ec7509d15..bcbc6a7b51 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -169,6 +169,11 @@ class LdapSync extends Command $item['activated'] = ( in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts) ) ? 1 : 0; } else { $item['activated'] = 0; + + // If there is no activated flag, assume this is handled via the OU and activate the users + if (empty($ldap_result_active_flag)) { + $item['activated'] = 1; + } } // User exists