Check if user is in Role

  • Thread starter Thread starter shapper
  • Start date Start date
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
 
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.
 
Back
Top