From f9f4ba504eddab7288f07947a7c5ec4a65b90f90 Mon Sep 17 00:00:00 2001 From: "root@zabbix.znil.net" Date: Sat, 6 Feb 2021 12:34:56 +0100 Subject: [PATCH] fixed error when moving user to disbled group --- zabbix-ldap-sync.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zabbix-ldap-sync.sh b/zabbix-ldap-sync.sh index bb27f88..61af42d 100755 --- a/zabbix-ldap-sync.sh +++ b/zabbix-ldap-sync.sh @@ -1294,7 +1294,8 @@ if [ "$b_Must_Sync_Users" = "true" ]; then fi tempvar="" # maybe the list is empty! So we have to check - if [ "$list_of_userids" != "" ]; then list_of_userids=${list_of_userids::-1}; fi + # if [ "$list_of_userids" != "" ]; then list_of_userids=${list_of_userids::-1}; fi + list_of_userids="" for (( i=0; i < ${#new_ZABBIX_ARRAY_disabled_User_userid[*]}; i++ )); do list_of_userids+='"'${new_ZABBIX_ARRAY_disabled_User_userid[$i]}'"' list_of_userids+=","