controlling user access

gegirl

New member
Joined
Mar 26, 2011
Messages
3
Programming Experience
Beginner
hello.. can anyone help me with this problem? how to create different redirect to different forms based on the role of user? For example, the system identifies the person login as "basic user" and redirect to "form 1", where the "premium user" will be redirect to "form 2" and "admin" will be redirected to "form3"? thanks =)
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
I'm going to assume you know how to check which user type has just logged in of which you could probably use a Select Case statement & from there, simply show the appropriate form. We need to know a lot more about this to provide a better answer, like how do you check whether it's a valid user or not, where is the user type info stored, what's your current code for all of this, etc.
 

ss7thirty

Well-known member
Joined
Jun 14, 2005
Messages
455
Location
New Jersey, US
Programming Experience
5-10
VB.NET:
UserName = WindowsIdentity.GetCurrent().Name
That will get you the windows username of the person running the application currently. From there you can do like Juggalo said:

you could probably use a Select Case statement & from there, simply show the appropriate form

but also like he said we would need more information to understand what type of user's you plan to use for your application.
 
Top Bottom