Closed Arkantium closed 7 months ago
Hi @Arkantium,
I'm not sure what you mean. Can you elaborate and share a code example? Also, please add a title to the issue.
Hmm.
I want my user can only see the object in this two OU
OU=0818_CASTELLI,OU=Adherents,OU=Infra_Ceicom,DC=gedimat,DC=fr and OU=0818_CASTELLI,OU=Adherents,DC=gedimat,DC=fr
I try to make an scope for block user in this two OU
LDAP searches can only be performed on one OU at a time. For LDAP to perform a search inside of an OU, it needs to be set as the base DN of the query, and an LDAP query can only have one base. This isn't a limitation of LdapRecord, but a limitation of the protocol itself.
To see all users in a particular OU, call the in()
method on the query:
use LdapRecord\Models\ActiveDirectory\User;
$users = User::in('OU=0818_CASTELLI,OU=Adherents,DC=gedimat,DC=fr')->get();
$users = $users->merge(
User::in('OU=0818_CASTELLI,OU=Adherents,OU=Infra_Ceicom,DC=gedimat,DC=fr')->get()
);
Hope this helps!
Hi,
How to make a query to search if an object exists only in a list of OU selection? I have try with Raw filter but no success
Environment: