As I was going through implementing a custom role provider I came across these two methods
public override string[] GetUsersInRole(string roleName) {}
public override string[] FindUsersInRole(string roleName, string usernameToMatch) {}
Aren’t these the same thing? You provide a role and get all the users that are in that role back? Actually I don’t even get what the point of the usernameToMatch in the FindUsersInRole is for… My understanding is that is should return multiple users, but wouldn’t this limit it to one?
If I remember right
GetUsersInRolewill get all the users that have that role. This is theaspnetdbsql query it executes :In
FindUsersInRole, you send over a rolename as well as a username pattern. The method will return a user that match the username. Here is theaspnetdbsql for this method :So the two methods serve two different functions.