diff --git a/sync/migrateLDAP.php b/sync/migrateLDAP.php new file mode 100644 index 0000000..472f9eb --- /dev/null +++ b/sync/migrateLDAP.php @@ -0,0 +1,33 @@ +searchUsers($oUser->getUserName(), array ("dn")); + if (count($aResults) > 1) { + echo "retrieved " . count($aResults) . " matches for username=" + $oUser->getUserName(); + } else { + $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 "Change the configuration file to point to the new directory server-" . $sNewLdapServer; +?> \ No newline at end of file