- small bug with "No GPG key" message marked in the code

- path to homedir for GPG added in User.php
pull/61/head
Andrzej Dereszowski 2012-04-02 12:14:27 +02:00
parent 216b77f854
commit 6c5a5aa427
2 changed files with 2 additions and 1 deletions

View File

@ -60,6 +60,7 @@ class EventsController extends AppController {
$this->set('events', $this->paginate());
if (!$this->Auth->user('gpgkey')) {
// FIXME small bug here: user has to logout and login back to make the this
$this->Session->setFlash('No GPG key set in your profile. To receive emails, submit your public key in your profile.');
}
}

View File

@ -198,7 +198,7 @@ class User extends AppModel {
// key is entered
require_once 'Crypt/GPG.php';
$gpg = new Crypt_GPG();
$gpg = new Crypt_GPG(array('homedir' => Configure::read('GnuPG.homedir')));
try {
$key_import_output = $gpg->importKey($check['gpgkey']);
if (!empty($key_import_output['fingerprint'])) {