I've been doing some custom extensions that involve pulling umbraco.cms.businesslogic.member.Member classes and am curious about something. The GetMember* methods are marked as deprecated and claim that you should use the System.Web.Security.Member.GetMember* methods instead--but those return a different class type. I need the real umbraco Member with the getProperty() functionality. What's the most efficient and proper manner to retrieve a member given their email or login?
proper way to retrieve umbraco Members
I've been doing some custom extensions that involve pulling umbraco.cms.businesslogic.member.Member classes and am curious about something. The GetMember* methods are marked as deprecated and claim that you should use the System.Web.Security.Member.GetMember* methods instead--but those return a different class type. I need the real umbraco Member with the getProperty() functionality. What's the most efficient and proper manner to retrieve a member given their email or login?
You should use the ASP.NET ProfileProvider API which allows you to create a strongly typed class representing the member type: http://www.aaron-powell.com/umbraco-members-profiles
Slace,
I've checked your blog post but there's something I do not understand.
I see you declare custom properties in your web.config like this:
<add name="first_name" ..............
But these properties are also already declared in the umbraco backoffice, right?
Why this duplicate entry? It doesn't seem right.
While implementing I noticed this method:
Isn't this something umbraco could use to add the properties defined in the umbraco backend? (that method can only be called at app initialization)
I'm not familiar with that API method so I'm not sure if it can be used, you'd have to test it.
The reason I went with my implementation is because I wanted a strongly typed representation of the member type, something that's *kind of* a DTO.
is working on a reply...