Skip to content

Commit

Permalink
Enigma: Add positiblity to modify list of identities for key generati…
Browse files Browse the repository at this point in the history
…on by other plugins
  • Loading branch information
alecpl committed Apr 5, 2018
1 parent ad628a9 commit e57c66f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/enigma/lib/enigma_ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,11 @@ function tpl_key_create_form($attrib)
// get user's identities
$identities = $this->rc->user->list_identities(null, true);
$checkbox = new html_checkbox(array('name' => 'identity[]'));
foreach ((array) $identities as $idx => $ident) {

$plugin = $this->rc->plugins->exec_hook('enigma_user_identities', array('identities' => $identities));
$identities = $plugin['identities'];

foreach ($identities as $idx => $ident) {
$name = empty($ident['name']) ? ($ident['email']) : $ident['ident'];
$attr = array('value' => $idx, 'data-name' => $ident['name'], 'data-email' => $ident['email']);
$identities[$idx] = html::label(null, $checkbox->show($idx, $attr) . rcube::Q($name));
Expand Down

0 comments on commit e57c66f

Please sign in to comment.