How do I retrieve a member by a custom property? I'm trying something like this and getting YSOD, Object reference not set to an instance of an object.
Member myMember = Member.GetAllAsList().SingleOrDefault(x => x.getProperty("myProperty").Value.ToString() == strMyProperty);
get a member by a custom property
How do I retrieve a member by a custom property? I'm trying something like this and getting YSOD, Object reference not set to an instance of an object.
Member myMember = Member.GetAllAsList().SingleOrDefault(x => x.getProperty("myProperty").Value.ToString() == strMyProperty);
Hi, What version of umbraco? Take a look at my blog post for this :). http://www.charlesafford.com/umbraco-membership-provider.aspx
Hope that helps.
can you debug your code? are you getting anything in Member.GetAllAsList?
if so then i guess it will be the property name. remember to check of the property exsists and that it is not null or empty :). Charlie.
You could try uMembership. It has a method called SearchMembersByPropertyValue.
Jeroen
Thanks!
is working on a reply...