summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 77d35b5)
raw | patch | inline | side by side (parent: 77d35b5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 May 2007 09:41:03 +0000 (09:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 May 2007 09:41:03 +0000 (09:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6340 594d385d-05f5-0310-b6e9-bd551577e9d8
setup/class_setupStep_Migrate.inc | patch | blob | history |
index 6d94881da11e3cbecb68e3af570cb53d28e0d878..b166c1a3767d54843a2e81ede57e5220c5301b25 100644 (file)
$new_user['cn'] = "System Administrator";
$new_user['uid'] = $uid;
$new_user['userPassword'] = $hash;
-
+
$ldap->cd($cv['base']);
+
+ $ldap->cat($dn,array("dn"));
+ if($ldap->count()){
+ print_red(sprintf(_("Could not add administrative user, there is already an object with the same dn '%s' in your ldap database."),$dn));
+ return(FALSE);
+ }
+
$ldap->create_missing_trees(preg_replace("/^[^,]+,/","",$dn));
$ldap->cd($dn);
$res = $ldap->add($new_user);