tags:

views:

183

answers:

3

I thought this would be really simple but ..

We've create a user and a member type with various properties When we try to access the properties via the member object we got nothing.

//Member m is current User

eg. Property s = m.getProperty("PreferdUserName"); is null

m.getProperties has a count of Zero..

have we missed something obvious?

A: 

Could there be a spelling error?

"PreferdUserName" may want to be "PreferredUserName".

Other than that it looks correct.

BeaverProj
i had checked that one as well :)
AyKarsi
A: 

In the end i resorted to storing member properties in a separate db table, which anyhow is closer to what i need. I presume it had something to do with the way I created the memberType from outside umbraco using a custom msbuild task.

AyKarsi
A: 

Try

Property s = m.getProperty("PreferdUserName").value;

If that still doesn't work, then check out this great post about member properties

http://legacy.aaron-powell.com/blog/july-2009/umbraco-member-profiles.aspx

leen3o