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

pull/6465/head
Aleksander Machniak 6 years ago
parent ad628a9bef
commit e57c66f0d3

@ -721,7 +721,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::label(null, $checkbox->show($idx, $attr) . rcube::Q($name));

Loading…
Cancel
Save