Code

* Allow Open-Xchange accountnames with a dot in them.
authorcareworks <careworks@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 1 Mar 2006 10:08:53 +0000 (10:08 +0000)
committercareworks <careworks@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 1 Mar 2006 10:08:53 +0000 (10:08 +0000)
* Check that we're not writing an empty loginname to the OX database

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2794 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/connectivity/class_oxchangeAccount.inc

index 317506027c0dbb300b15c25635ebd5ba33e665e0..71470967043e59b7da3216cf033a85da1b993056 100644 (file)
@@ -776,10 +776,14 @@ $ldap->modify ($this->attrs);
       }
     }
 
-       $uidarray=array();
-       preg_match("/^(\w+(?=\=))=((\w|\s)+(?=\,)),.*/",$this->dn,$uidarray);
-       $uid=$uidarray[2];
-    
+    $uidarray=array();
+    preg_match("/^(\w+(?=\=))=((\w|\s|\.)+(?=\,)),.*/",$this->dn,$uidarray);
+    $uid=$uidarray[2];
+    if (trim($uid) == "") {
+      print_red(_("The Open-Xchange accountname is empty and thus invalid! Check to make sure that ".
+                  "you are not using any strange characters in the loginname."));
+    }
+       
     if ($istemplate) $needupdate=TRUE;
 
     if($needupdate){