From 697726205a63a7780e80d3748c95960b5db45b2e Mon Sep 17 00:00:00 2001 From: SJ Date: Fri, 3 May 2013 16:05:09 +0200 Subject: [PATCH] AD sip fix --- webui/model/user/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index b01863d6..993ba382 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -141,13 +141,13 @@ class ModelUserAuth extends Model { for($i = 0; $i < $a[$mailattr]['count']; $i++) { if(preg_match("/^smtp\:/i", $a[$mailattr][$i]) || strchr($a[$mailattr][$i], '@') ) { $email = strtolower(preg_replace("/^smtp\:/i", "", $a[$mailattr][$i])); - if(!in_array($email, $data) && strchr($email, '@')) { array_push($data, $email); } + if(!in_array($email, $data) && strchr($email, '@') && substr($email, 0, 4) != 'sip:') { array_push($data, $email); } } } } else { $email = strtolower(preg_replace("/^smtp\:/i", "", $a[$mailattr])); - if(!in_array($email, $data) && strchr($email, '@')) { array_push($data, $email); } + if(!in_array($email, $data) && strchr($email, '@') && substr($email, 0, 4) != 'sip:') { array_push($data, $email); } } } }