Enigma: Add positiblity to modify list of identities for key generation by other plugins

pull/6241/head
Aleksander Machniak 7 years ago
parent 9d262402db
commit 662363c7e2

@ -752,7 +752,11 @@ class enigma_ui
// 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::tag('li', null, html::label(null, $checkbox->show($idx, $attr) . rcube::Q($name)));

Loading…
Cancel
Save