Code

Fixed potential empty ridbase
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Feb 2008 21:05:23 +0000 (21:05 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Feb 2008 21:05:23 +0000 (21:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9222 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/personal/samba/class_sambaAccount.inc

index 06bacdb798d0ac54a81b630a9e55a4dd3984b2ff..b338fa811f0b16521887c10599c056e8c4ed2079 100644 (file)
@@ -137,7 +137,11 @@ class sambaAccount extends plugin
       $ldap->search ("(&(objectClass=sambaDomain)(sambaSID=$this->SID))",array("sambaAlgorithmicRidBase","sambaDomainName"));
       if ($ldap->count() != 0){
         $attrs= $ldap->fetch();
-        $this->ridBase= $attrs['sambaAlgorithmicRidBase'][0];
+        if(isset($attrs['sambaAlgorithmicRidBase'])){
+          $this->ridBase= $attrs['sambaAlgorithmicRidBase'][0];
+        } else {
+          $this->ridBase= $this->config->current['RIDBASE'];
+        }
         if ($this->sambaDomainName == ""){
           $this->sambaDomainName= $attrs['sambaDomainName'][0];
         }