From 87baedc1ee8bcbd9353c2803ade2f8073d720cdd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 6 Nov 2016 14:31:23 +0000 Subject: [PATCH] Valid user --- src/freedombone-utils-gpg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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