From 4c6ea92ba367d0b8af75fbaa6aa382f129a52c37 Mon Sep 17 00:00:00 2001 From: iglocska Date: Mon, 8 Sep 2014 13:34:14 +0200 Subject: [PATCH] Small fix to avoid repeated incorrect invalid messages after the first failed check --- app/Model/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Model/User.php b/app/Model/User.php index 63d28e573..31bcbea6e 100755 --- a/app/Model/User.php +++ b/app/Model/User.php @@ -382,13 +382,13 @@ class User extends AppModel { require_once 'Crypt/GPG.php'; $this->Behaviors->detach('Trim'); $results = array(); - $gpg = new Crypt_GPG(array('homedir' => Configure::read('GnuPG.homedir'))); $users = $this->find('all', array( 'conditions' => array('not' => array('gpgkey' => '')), //'fields' => array('id', 'email', 'gpgkey'), 'recursive' => -1, )); foreach ($users as $k => $user) { + $gpg = new Crypt_GPG(array('homedir' => Configure::read('GnuPG.homedir'))); $key = $gpg->importKey($user['User']['gpgkey']); $gpg->addEncryptKey($key['fingerprint']); // use the key that was given in the import try {