summaryrefslogtreecommitdiff
path: root/plugins/kolab_delegation
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-11-27 09:44:38 (GMT)
committerAleksander Machniak <alec@alec.pl>2014-11-27 09:44:38 (GMT)
commit62ac800db735462cd74a5cf66c0ac23605aa816e (patch)
treeed79b5a5ba81f4aaf4757c2d0e1eaf2bb66d1b25 /plugins/kolab_delegation
parentae93c7b345f8ff3cb33302472ec53a27afbc250c (diff)
downloadroundcubemail-plugins-kolab-62ac800db735462cd74a5cf66c0ac23605aa816e.tar.gz
Use new rcube_user::list_emails() for better performance (#3970)
Diffstat (limited to 'plugins/kolab_delegation')
-rw-r--r--plugins/kolab_delegation/kolab_delegation_engine.php26
1 files changed, 4 insertions, 22 deletions
diff --git a/plugins/kolab_delegation/kolab_delegation_engine.php b/plugins/kolab_delegation/kolab_delegation_engine.php
index b5dc759..52dec8c 100644
--- a/plugins/kolab_delegation/kolab_delegation_engine.php
+++ b/plugins/kolab_delegation/kolab_delegation_engine.php
@@ -540,21 +540,6 @@ class kolab_delegation_engine
}
/**
- * Returns current user identities
- *
- * @return array List of identities
- */
- public function user_identities()
- {
- // cache result in-memory, we need it more than once
- if ($this->identities === null) {
- $this->identities = $this->rc->user->list_identities();
- }
-
- return $this->identities;
- }
-
- /**
* Update LDAP record of current user
*
* @param array List of delegates
@@ -596,7 +581,7 @@ class kolab_delegation_engine
$delegators = $this->list_delegators();
$use_subs = $this->rc->config->get('kolab_use_subscriptions');
- $identities = $this->user_identities();
+ $identities = $this->rc->user->list_emails();
$emails = array();
$uids = array();
@@ -611,10 +596,7 @@ class kolab_delegation_engine
// get user name from default identity
if (!$idx) {
$default = array(
- 'name' => $ident['name'],
-// 'organization' => $ident['organization'],
-// 'signature' => $ident['signature'],
-// 'html_signature' => $ident['html_signature'],
+ 'name' => $ident['name'],
);
}
$emails[$ident['identity_id']] = $ident['email'];
@@ -738,7 +720,7 @@ class kolab_delegation_engine
return;
}
- $identities = $this->user_identities();
+ $identities = $this->rc->user->list_emails();
$emails = $_SESSION['delegators'][$context];
foreach ($identities as $ident) {
@@ -768,7 +750,7 @@ class kolab_delegation_engine
}
// return only user addresses (exclude all delegators addresses)
else if (!empty($_SESSION['delegators'])) {
- $identities = $this->user_identities();
+ $identities = $this->rc->user->list_emails();
$emails[] = $this->rc->user->get_username();
foreach ($identities as $identity) {