Add IMP_Prefs_Identity::getAllIdentityAddresses().
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Sep 2010 05:53:27 +0000 (23:53 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Sep 2010 05:53:27 +0000 (23:53 -0600)
imp/lib/Prefs/Identity.php

index 1b7a221..a08d57b 100644 (file)
@@ -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.
      *