Hi,
Let me begin by saying i'm a complete newbie when it comes to html/php, but i'm very enthousiastic and so far alot of things have worked out okay. I'm very hopeful about this too 🙂
In short, i want to make a php form that can add users to Active Directory. This part is working. I also want to be able to select groups and make the user member of them. This works partly. I have made a select box where i import all the groups from AD. But this is totally user unfriendly, as it displays the groups with full DN (because MS doesnt want the CN, you have to provide the full, horrible DN), like this:
CN=Appl-Excel,OU=Application Groups,OU=Management,DC=my,DC=company
CN=Appl-Word,OU=Application Groups,OU=Management,DC=my,DC=company
and so on ..
What would really be nice is if i can have a selectbox where i can select the group name by CN (so just Appl-Excel, or Appl-Word) and have PHP insert the full DN belonging to that group to a list.
I will then have php get each entry in the list (full DN!) and make the user member of it.
I have no idea if this is even possible, because my knowledge of php isn't that good, but i have some ideas though:
What if each entry in the select box is actually an array that consists of 2 elements: the short CN and the full DN. Only the CN gets displayed, but if selected and added to the list it will look at the second element of the selected array and puts that in the list.
I do hope i made myself clear enough, and that anyone is willing to help.
Thanks so much in advance,
errtu