Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I can't figure out how to fetch the built in email address from a TypedMember. When using dynamics, member.email works fine. However, i can't find any data in the property called email in the typed object. Is it called something else?
http://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/ doesn't really help out : /
Hi Anders,
Have you tried using the GetPropertyValue method like as follows:
@Umbraco.TypedMember(id).GetPropertyValue("email");
Thanks,Dan.
To be honest, no. But i did try:
@Umbraco.TypedMember(id).GetPropertyValue<string>("email");
...that returns an empty string.
Did you ever find a solution? I'm facing a similar issue trying to get the user name. If no solution has been found, I think a bug should be filed.
Nah, no solution. Worked around it with the dynamic object instead.
Hi all,
Is there already a solution for this? Currently I have the same problem with TypedMember and getting the email address.
Best,
Sören
I have found the same limitation in v6.2.5 and the only way I could work around it was like Anders to use the dynamic object by changing:
var member = Umbraco.TypedMember(id)
to
var member = Umbraco.Member(id)
Then access it via member.Email
member.Email
Not ideal but I couldn't see anyway around it right now?
Simon
Use the case "Email" instead of "email" and it will work.
http://issues.umbraco.org/issue/U4-5456#comment=67-16519
If you're just calling Umbraco.TypedMember(1234) you get a reference to the member as IPublishedContent.
Umbraco.TypedMember(1234)
IPublishedContent
If you cast the member to MemberPublishedContent, you can access Email and other member related properties.
MemberPublishedContent
Email
Here is a quick example:
@{ MemberPublishedContent member = Umbraco.TypedMember(1234) as MemberPublishedContent; if (member != null) { <p>Username: @member.UserName</p> <p>Email: @member.Email</p> } }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Getting email from TypedMember
Hi,
I can't figure out how to fetch the built in email address from a TypedMember. When using dynamics, member.email works fine. However, i can't find any data in the property called email in the typed object. Is it called something else?
http://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/ doesn't really help out : /
Hi Anders,
Have you tried using the GetPropertyValue method like as follows:
Thanks,
Dan.
To be honest, no. But i did try:
...that returns an empty string.
Did you ever find a solution? I'm facing a similar issue trying to get the user name. If no solution has been found, I think a bug should be filed.
Nah, no solution. Worked around it with the dynamic object instead.
Hi all,
Is there already a solution for this? Currently I have the same problem with TypedMember and getting the email address.
Best,
Sören
I have found the same limitation in v6.2.5 and the only way I could work around it was like Anders to use the dynamic object by changing:
to
Then access it via
member.Email
Not ideal but I couldn't see anyway around it right now?
Simon
Use the case "Email" instead of "email" and it will work.
http://issues.umbraco.org/issue/U4-5456#comment=67-16519
If you're just calling
Umbraco.TypedMember(1234)
you get a reference to the member asIPublishedContent
.If you cast the member to
MemberPublishedContent
, you can accessEmail
and other member related properties.Here is a quick example:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.