More details on the PGP validation tool

pull/712/head
Iglocska 2015-10-27 15:18:04 +01:00
parent f9da3f2d2c
commit 80f29c1f33
2 changed files with 3 additions and 2 deletions

View File

@ -388,6 +388,7 @@ class User extends AppModel {
$gpg->addEncryptKey($key['fingerprint']); // use the key that was given in the import
$enc = $gpg->encrypt('test', true);
} catch (Exception $e){
$results[$user['User']['id']][2] = $e->getMessage();
$results[$user['User']['id']][0] = true;
}
$results[$user['User']['id']][1] = $user['User']['email'];

View File

@ -2,9 +2,9 @@
<h3>GPG key validation</h3>
<ul>
<?php foreach ($users as $k => $user) {
echo $k . ' (' . $user[1] . '):';
echo '<a href="/admin/users/view/' . $k . '">' . $k . ' (' . h($user[1]) . ')</a>:';
if (isset($user[0])) {
echo '-> <span style="color:red;">Invalid.</span><br />';
echo '-> <span style="color:red;"><span style="font-weight:bold">Invalid.</span> (' . h($user[2]) . ')</span><br />';
} else {
echo '-> <span style="color:green;">OK</span><br />';
}