From 9f33fb2765bf34e8a06be55a7141acfd04ef2c9d Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 8 Jan 2004 13:16:09 +0000 Subject: [PATCH] added line breaks and
 formatting

---
 sync/migrateLDAP.php | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sync/migrateLDAP.php b/sync/migrateLDAP.php
index 472f9eb..9e58d69 100644
--- a/sync/migrateLDAP.php
+++ b/sync/migrateLDAP.php
@@ -13,21 +13,22 @@ require_once("../config/dmsDefaults.php");
 $aUsers = User::getList();
 
 // then initialise the LDAP authenticator with the new directory server address
-$sNewLdapServer = "smaurg.mrc.ac.za";
-$sNewLdapDn = "";
+$sNewLdapServer = "jam001.jamwarehouse.com";
+$sNewLdapDn = "CN=Users,DC=jamwarehouse,DC=com";
 $oLdap = new LDAPAuthenticator($sNewLdapServer, $sNewLdapDn);;
-
+echo "
";
 for ($i=0; $isearchUsers($oUser->getUserName(), array ("dn"));
 	if (count($aResults) > 1) {
-		echo "retrieved " . count($aResults) . " matches for username=" + $oUser->getUserName();
-	} else {
+		echo "retrieved " . count($aResults) . " matches for username=" . $oUser->getUserName() . ": " . arrayToString($aResults) . "
"; + } else if (count($aResults) == 1) { $sNewDN = $aResults[$oUser->getUserName()]["dn"]; // echo an update statement that sets the dn to the correct value - echo "UPDATE users SET ldap_dn='" . $sNewDN . "' WHERE id=" . $oUser->getID(); + echo "UPDATE users SET ldap_dn='" . $sNewDN . "' WHERE id=" . $oUser->getID() . "
"; } } echo "Change the configuration file to point to the new directory server-" . $sNewLdapServer; +echo "
"; ?> \ No newline at end of file -- libgit2 0.21.4