Code

Fixed phoneNumber adaption.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Sep 2007 06:29:24 +0000 (06:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Sep 2007 06:29:24 +0000 (06:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7319 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/users/tabs_user.inc

index 568ad9e544f9b2a08fc9aaec3536e19d0e211cff..5620ef066b7e310b4d07820690a75c8977a2bbab 100644 (file)
@@ -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;
+      }
     }
   }