From: hickert Date: Wed, 19 Sep 2007 06:29:24 +0000 (+0000) Subject: Fixed phoneNumber adaption. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9bb0c6639b41abd11925a617690190fee02d80b5;p=gosa.git Fixed phoneNumber adaption. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7319 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index 568ad9e54..5620ef066 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -65,17 +65,23 @@ class usertabs extends tabs } } } + + /* Move number from fax plugin */ if ($this->last == "gofaxAccount"){ - /* Move number from fax plugin */ $this->by_object['user']->facsimileTelephoneNumber= $this->by_object['gofaxAccount']->facsimileTelephoneNumber; } + + /* Move number from fax plugin */ if ($this->last == "phoneAccount" && $this->by_object['phoneAccount']->is_account){ - /* Move number from fax plugin */ reset($this->by_object['phoneAccount']->phoneNumbers); $number= key($this->by_object['phoneAccount']->phoneNumbers); - $this->by_object['user']->telephoneNumber= $number; + + /* Only the first phoneAccount number, if it is not empty */ + if(!empty($number)){ + $this->by_object['user']->telephoneNumber= $number; + } } }