浏览代码

Valid user

Bob Mottram 8 年前
父节点
当前提交
87baedc1ee
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      src/freedombone-utils-gpg

+ 2
- 2
src/freedombone-utils-gpg 查看文件

@@ -31,7 +31,7 @@
31 31
 function enable_email_encryption_at_rest {
32 32
     for d in /home/*/ ; do
33 33
         USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
34
-        if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then
34
+        if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
35 35
             if grep '#/usr/bin/gpgit.pl' /home/$USERNAME/.procmailrc; then
36 36
                 sed -i 's|#/usr/bin/gpgit.pl|/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc
37 37
             fi
@@ -46,7 +46,7 @@ function enable_email_encryption_at_rest {
46 46
 function disable_email_encryption_at_rest {
47 47
     for d in /home/*/ ; do
48 48
         USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
49
-        if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then
49
+        if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
50 50
             if ! grep '#/usr/bin/gpgit.pl' /home/$USERNAME/.procmailrc; then
51 51
                 sed -i 's|/usr/bin/gpgit.pl|#/usr/bin/gpgit.pl|g' /home/$USERNAME/.procmailrc
52 52
             fi