diff --git a/example_configs/lldap-ha-auth.sh b/example_configs/lldap-ha-auth.sh index 86500e1..e8c76a8 100644 --- a/example_configs/lldap-ha-auth.sh +++ b/example_configs/lldap-ha-auth.sh @@ -64,7 +64,7 @@ if [[ ! -z "$2" ]] && ! jq -e '.groups|map(.displayName)|index("'"$2"'")' <<< $U exit 1 fi -DISPLAY_NAME=$(jq -r .displayName <<< $USER_JSON) +DISPLAY_NAME=$(jq -r '.displayName // .id' <<< $USER_JSON) IS_ADMIN=false if [[ ! -z "$3" ]] && jq -e '.groups|map(.displayName)|index("'"$3"'")' <<< "$USER_JSON" > /dev/null 2>&1; then @@ -88,4 +88,4 @@ if [[ "$IS_LOCAL" = true ]]; then echo "local_only = true" else echo "local_only = false" -fi \ No newline at end of file +fi