From 92cd7f34b07e86062f2c024039e3309768b48ce6 Mon Sep 17 00:00:00 2001
From: Andy Wermke <andy@dev.next-step-software.com>
Date: Thu, 04 Apr 2013 10:10:23 -0400
Subject: [PATCH] Merge branch 'master' of https://github.com/roundcube/roundcubemail
---
program/lib/Roundcube/rcube_user.php | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php
index 864f2e0..505b190 100644
--- a/program/lib/Roundcube/rcube_user.php
+++ b/program/lib/Roundcube/rcube_user.php
@@ -2,8 +2,6 @@
/*
+-----------------------------------------------------------------------+
- | program/include/rcube_user.inc |
- | |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2005-2012, The Roundcube Dev Team |
| |
@@ -14,13 +12,11 @@
| PURPOSE: |
| This class represents a system user linked and provides access |
| to the related database records. |
- | |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
| Author: Aleksander Machniak <alec@alec.pl> |
+-----------------------------------------------------------------------+
*/
-
/**
* Class representing a system user
@@ -240,10 +236,12 @@
/**
* Return a list of all identities linked with this user
*
- * @param string $sql_add Optional WHERE clauses
+ * @param string $sql_add Optional WHERE clauses
+ * @param bool $formatted Format identity email and name
+ *
* @return array List of identities
*/
- function list_identities($sql_add = '')
+ function list_identities($sql_add = '', $formatted = false)
{
$result = array();
@@ -255,6 +253,15 @@
$this->ID);
while ($sql_arr = $this->db->fetch_assoc($sql_result)) {
+ if ($formatted) {
+ $ascii_email = format_email($sql_arr['email']);
+ $utf8_email = format_email(rcube_utils::idn_to_utf8($ascii_email));
+
+ $sql_arr['email_ascii'] = $ascii_email;
+ $sql_arr['email'] = $utf8_email;
+ $sql_arr['ident'] = format_email_recipient($ascii_email, $sql_arr['name']);
+ }
+
$result[] = $sql_arr;
}
--
Gitblit v1.9.1