LDAP – Create a list of Groupwise users inside an OU

This is just an example illustrating how to connect to the LDAP and get users and groups within a particular OU. The first part connects to the LDAP Second part gets all the groups within the specified OU and puts them in an array Last part gets loops through the groups and gets all the users within each group and puts them in a array Fill your LDAP connection parameters in this part [crayon-59e6eb236bd5e087535102/] This part will get all groups within the OU. You may need to change OU=User Accounts part if your User Accounts are in a different OU e.g. Employee Accounts [crayon-59e6eb236bd66950729610/] This part will get all users within each of the groups [crayon-59e6eb236bd6b619837817/] Echoes all the groups and users [crayon-59e6eb236bd71712470499/]   ...
Read More