From 9a22890d7257cd8934200f7c7154959392dcaaa0 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 21 Sep 2010 23:53:27 -0600 Subject: [PATCH] Add IMP_Prefs_Identity::getAllIdentityAddresses(). --- imp/lib/Prefs/Identity.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/imp/lib/Prefs/Identity.php b/imp/lib/Prefs/Identity.php index 1b7a2211a..a08d57bd2 100644 --- a/imp/lib/Prefs/Identity.php +++ b/imp/lib/Prefs/Identity.php @@ -290,6 +290,21 @@ class Imp_Prefs_Identity extends Horde_Core_Prefs_Identity } /** + * Returns a list of all e-mail addresses from all identities, including + * both from addresses and tie addreses. + * + * @return array A list of e-mail addresses. + */ + public function getAllIdentityAddresses() + { + /* Combine the keys (which contain the e-mail addresses). */ + return array_merge( + array_keys($identity->getAllFromAddresses(true)), + array_keys($identity->getAllTieAddresses()) + ); + } + + /** * Returns the list of identities with the default identity positioned * last. * -- 2.11.0