コード例 #1
0
ファイル: exec.ldap.php プロジェクト: BillTheBest/1.6.x
function parseusers()
{
    $ldap = new clladp();
    $hash = GetOus();
    if (is_array($hash)) {
        while (list($num, $ligne) = each($hash)) {
            echo "\n\t\t================================================\n\t\t\t\tFound organization: {$num}\n\t\t================================================\n\t\t";
            SearchUsers($num);
        }
    }
}
コード例 #2
0
ファイル: exec.ldap.rebuild.php プロジェクト: rsd/artica-1.5
	$upd["objectClass"][]="dcObject";
	$upd["o"][]="organizations";
	$upd["dc"][]="organizations";
	if(!$ldap->ldap_add("dc=organizations,$ldap->suffix",$upd)){
		write_syslog("Unable to create new entry dc=organizations,$ldap->suffix",__FILE__);
		write_syslog($ldap->ldap_last_error,__FILE__);
		die();
	}

	$ldap->ArticaCreate();
}else{
	$ldap->ArticaCreate();
	die();
}
	
$hash=GetOus();	
if(is_array($hash)){
	while (list ($num, $ligne) = each ($hash) ){
		mouvDN($ligne,"dc=organizations,$ldap->suffix");
		
	}
}

$neworganizations=$ldap->hash_get_ou();
if(is_array($neworganizations)){
	while (list ($num, $org) = each ($neworganizations) ){
		CheckUsers($org);
		CheckGroups($org);
	}