summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/lib/Roundcube/rcube_user.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php
index 68156b157..77c58dd14 100644
--- a/program/lib/Roundcube/rcube_user.php
+++ b/program/lib/Roundcube/rcube_user.php
@@ -240,9 +240,11 @@ class rcube_user
/**
* Return a list of all user emails (from identities)
*
+ * @param bool Return only default identity
+ *
* @return array List of emails (identity_id, name, email)
*/
- function list_emails()
+ function list_emails($default = false)
{
if ($this->emails === null) {
$this->emails = array();
@@ -259,7 +261,7 @@ class rcube_user
}
}
- return $this->emails;
+ return $default ? $this->emails[0] : $this->emails;
}
/**