#!/bin/bash

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

source /usr/libexec/helper-scripts/accountctl.sh

if ! output="$(/usr/libexec/helper-scripts/get-user-list)"; then
    echo "ERROR: Failed to get user list!" >&2
    exit 1
fi

readarray -t user_list <<< "$output"

for user in "${user_list[@]}"; do
   if [ -n "$(get_clean_pass "${user}")" ]; then
      echo 'Present'
   else
      echo 'Absent'
   fi
done
