Check if user is in Role

S

shapper

Hello,

I need to check if a user with a certain username is in a specific
role.
This is not the current user which is logged on.

How can I do this?

Thanks,
Miguel
 
M

Mark Fitzpatrick

If your using the membership api, the Roles class has a IsUserInRole method
to do exactly this. It has an overload which takes two parameters, the first
being the username and the second being the role in question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top