From 83224cd9d3f3b52214fa755a9e7d667a16ec92d9 Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 11 Dec 2012 22:13:52 +0100 Subject: [PATCH] fixed a bug during ldap import from openldap when a user has email aliases, too --- webui/model/user/import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webui/model/user/import.php b/webui/model/user/import.php index eb01917b..86ac20a8 100644 --- a/webui/model/user/import.php +++ b/webui/model/user/import.php @@ -50,7 +50,7 @@ class ModelUserImport extends Model { for($i = 0; $i < $result[$__mail_attr]['count']; $i++) { LOGGER("found email entry: " . $result['dn'] . " => $__mail_attr:" . $result[$__mail_attr][$i]); - if(preg_match("/^smtp\:/i", $result[$__mail_attr][$i])) { + if(preg_match("/^smtp\:/i", $result[$__mail_attr][$i]) || strchr($result[$__mail_attr][$i], '@') ) { $emails .= strtolower(preg_replace("/^smtp\:/i", "", $result[$__mail_attr][$i])) . "\n"; } }