Replies: 1 comment 6 replies
-
Hi @shark2k, What happens if you run: $groups = $employeeInfo->groups()->where('cn', 'contains', 'dog')->get();
dd($groups); What are the results? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @stevebauman (or whoever can answer).
This is a follow-up to #490 (which did help me).
In that answer @stevebauman gave this as one possible solution:
I did not implement that solution and ended up using a different one (that is not really all that efficient but works).
Anyway, I recently tried to implement the above using the following code as a test:
I specifically used "dog" to check because I am not a member of any group that contains the word "dog" in the CN, so I expect this code to fail.
However, when I run the code it displays "Contains dog" which is not correct.
If I were to loop through all the groups I am a member of and do a stripos($groupName, 'dog') in an if/else statement, that would give me the result I expected. This is currently what I do, but again it is not efficient and if I can get the above code to work, it should speed up execution of my code by a decent amount.
Thanks for any direction anyone can give me on what I am doing wrong/missing.
-Shark2k
Beta Was this translation helpful? Give feedback.
All reactions