diff --git a/src/freedombone-utils-gpg b/src/freedombone-utils-gpg index 0c5337e4..8c529be2 100755 --- a/src/freedombone-utils-gpg +++ b/src/freedombone-utils-gpg @@ -31,7 +31,7 @@ function enable_email_encryption_at_rest { for d in /home/*/ ; do USERNAME=$(echo "$d" | awk -F '/' '{print $3}') - if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then + if [[ $(is_valid_user "$USERNAME") == "1" ]]; then if grep '#/usr/bin/gpgit.pl' /home/$USERNAME/.procmailrc; then sed -i 's|#/usr/bin/gpgit.pl|/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc fi @@ -46,7 +46,7 @@ function enable_email_encryption_at_rest { function disable_email_encryption_at_rest { for d in /home/*/ ; do USERNAME=$(echo "$d" | awk -F '/' '{print $3}') - if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then + if [[ $(is_valid_user "$USERNAME") == "1" ]]; then if ! grep '#/usr/bin/gpgit.pl' /home/$USERNAME/.procmailrc; then sed -i 's|/usr/bin/gpgit.pl|#/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc fi