PHP LDAP - 显示组的组父级

时间:2016-07-14 21:30:08

标签: php search ldap

我有一个脚本,来自(https://samjlevy.com/archives/),显示memberOf属性

// ...
optionRenderer(option) {
    return (
        <div>
            {option.value} - {option.label} - {option.someOtherValue}
        </div>
    )
}
// ...
render() {
    let selectProps = {
        optionComponent: DropdownOptions,
        optionRenderer: this.optionRenderer,
        options: this.state.titleResults,
        simpleValue: true,
        clearable: this.state.clearable,
        name: 'selected-state',
        value: this.state.selectedTitleValue,
        onChange: this.handleTitleChosen,
        searchable: this.state.searchable,
        autofocus: true
    }
    return <Select {...selectProps} />
}

然后如何获取每个组并检查每个组所属的组,从而直接或间接显示用户所关联的每个组?

1 个答案:

答案 0 :(得分:1)

为Microsoft Active Directory“显示用户直接或间接关联的每个组”的最佳方法是使用通常称为LDAP_MATCHING_RULE_IN_CHAIN的可扩展锁存规则。

所以查询看起来类似于:

(member:1.2.840.113556.1.4.1941:=(CN=UserName,CN=Users,DC=YOURDOMAIN,DC=NET))