Get group...

bellportal

Newcomer
Joined
Oct 30, 2003
Messages
5
I am writing a programme with two different modules for my school:

One is the teacher's/staff section and one is the student's. All our users are split into windows groups either DOMAIN\Staff or DOMAIN\Pupils. How can I use VB.NET to determine which of these groups the currently logged-on user belongs to?

Mike
 
Honestly what you're doing is unclear. Aren't u saving users in a database? If not just save them in a local table. In that table you save the the username, password, ID, and group ID. From the group ID you specify to which group the user belongs to.
Cheers,
Mohsen
 
Sorry, the users are logging on to our domain 'DOMAIN'. I want to be able to find out their logon group...

Mike
 
Ok...

I'm going to suppose the school DC (Domain controler) it's at least a Windows 2000 Server.
If this is it, it works with the AD (Active Directory) witch, basiclly, it's a database that stores all network configurations.

To work with the AD, the Framework give us a propper namespace. Add this reference to your project and try it:

Code:
System.DirectoryServices.Dll
Alex :D
 
Back
Top