From 9a10af6fe502268a101a394b83efd28bbae3cbdb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 25 Mar 2014 12:22:00 +0000 Subject: [PATCH] missed to commit parameter to parse CN from url --- phpgwapi/inc/class.groupdav_principals.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.groupdav_principals.inc.php b/phpgwapi/inc/class.groupdav_principals.inc.php index a28fde9f1b..a526472f74 100644 --- a/phpgwapi/inc/class.groupdav_principals.inc.php +++ b/phpgwapi/inc/class.groupdav_principals.inc.php @@ -973,9 +973,10 @@ class groupdav_principals extends groupdav_handler * * @param string $url * @param string|array $only_type=null allowed types, return false for other (valid) types, eg. "users", "groups" or "resources", default all + * @param string $cn=null common name to be stored in case of an "e" uid * @return int|string|boolean integer account_id, string calendar uid or false if not a supported uid */ - static public function url2uid($url, $only_type=null) + static public function url2uid($url, $only_type=null, $cn=null) { if (!$only_type) $only_type = array('users', 'groups', 'resources', 'locations', 'mailto'); @@ -1026,7 +1027,7 @@ class groupdav_principals extends groupdav_handler } else // just store email-address { - $uid = 'e'.$rest; + $uid = $cn && $rest[0] != '<' && $cn != $rest ? 'e'.$cn.' <'.$rest.'>' : 'e'.$rest; $type = 'users'; } break;