The Syntax of RoleProvider's IsUserInRole method is:
public abstract bool IsUserInRole(
string username,
string roleName
)
So while overriding, you cannot include a third parameter.
Why not define your own custom method say ( extra 'S'):
IsUserInRoles(string username, string roleName1, string roleName2)
OR a more better way :
IsUserInRoles(string username, string[] roles)
and the body will like be:
protected bool IsUserInRoles(string username, string[] rolenames)
{
if (username == null || username == "")
throw exception;
if (rolenames == null || rolenames.Length==0)
throw exception;
//code to check if user exists in all roles
// you can call even the default IsUserInRole() method one by one for all roles
bool userInRoles=true;
foreach (string role in roles )
{
if( !UserIsInRole(role))
// set the boolean value to false
userInRoles = false;
}
return userInRoles;
}