From: hickert Date: Wed, 19 Sep 2007 06:30:13 +0000 (+0000) Subject: Updated phoneNumber adaption X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=59d713a43c2db3ac848b58a45a0431ad011d59cd;p=gosa.git Updated phoneNumber adaption git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7320 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/users/tabs_user.inc b/plugins/admin/users/tabs_user.inc index ecc70d05b..8f5244985 100644 --- a/plugins/admin/users/tabs_user.inc +++ b/plugins/admin/users/tabs_user.inc @@ -68,17 +68,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; + } } /* Possibly change acl base */