Getting a memberlist Options
DThought
Posted: Friday, September 21, 2007 8:51:27 AM
Rank: Newbie

Joined: 9/21/2007
Posts: 2
I need to get a complete list of all members that fulfills some requirements like "_member.getProperty("IsApproved").Value = 1"

How can I do this?

I am using the membercontrol and can get the entire list of members by "Member.GetAll" but that could be a larger list than the one I need.

Hope someone can help me :-)
tim
Posted: Friday, September 21, 2007 10:28:50 AM

Rank: Addict

Joined: 2/19/2007
Posts: 825
Location: Belgium
You will have to loop through all the members and check the property

Code:


  foreach (Member checkMember in Member.GetAll)
            {

                if (checkMember.getProperty("alias").Value == "value")
                {
                    checkMember.delete();
                }
               
            }



Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
DThought
Posted: Friday, September 21, 2007 11:46:31 AM
Rank: Newbie

Joined: 9/21/2007
Posts: 2
That was what I was affraid off :(

Thanks for the answer !
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.