From 2f4678908170b8af04a0eae2195bb3c0f732ed58 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 27 Nov 2014 10:08:55 +0100 Subject: Added rcube_user::list_emails() method with better performance than list_identities() which should be used always if we want only all user email addresses (with names) --- plugins/new_user_identity/new_user_identity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/new_user_identity/new_user_identity.php b/plugins/new_user_identity/new_user_identity.php index f7d60d4fa..b9054880e 100644 --- a/plugins/new_user_identity/new_user_identity.php +++ b/plugins/new_user_identity/new_user_identity.php @@ -67,7 +67,7 @@ class new_user_identity extends rcube_plugin return $args; } - $identities = $this->rc->user->list_identities(); + $identities = $this->rc->user->list_emails(); $ldap_entry = $this->lookup_user_name(array( 'user' => $this->rc->user->data['username'], 'host' => $this->rc->user->data['mail_host'], @@ -75,7 +75,7 @@ class new_user_identity extends rcube_plugin foreach ((array) $ldap_entry['email_list'] as $email) { foreach ($identities as $identity) { - if ($identity['email'] == $email ) { + if ($identity['email'] == $email) { continue 2; } } -- cgit v1.2.3