BlogEngine.Core.Providers.XmlRoleProvider.GetRolesForUser C# (CSharp) 메소드

GetRolesForUser() 공개 메소드

Gets a list of the roles that a specified user is in for the configured applicationName.
public GetRolesForUser ( string username ) : string[]
username string /// The user to return a list of roles for. ///
리턴 string[]
        public override string[] GetRolesForUser(string username)
        {
            ReadRoleDataStore();
            return (from role in this.roles[Blog.CurrentInstance.Id]
                    from user in role.Users
                    where user.Equals(username, StringComparison.OrdinalIgnoreCase)
                    select role.Name).ToArray();
        }