Is it possible to get email address of page creator? We have a contact form on each page and we'd like notifications to be sent to the person who created the page but I'm having issues finding a way to return the creator's email address. I can get their id and name but not email address. I can see you can can also get id by email so not being able to do it the other way round is a real shame.
I'm trying to do it using contour code fist on Submit
public override void Submit()
{
var currentNode = Node.GetCurrent();
string pageURL = umbraco.library.NiceUrlWithDomain(currentNode.Id);
string pageName = currentNode.Name;
string creatorName = Node.GetCurrent().CreatorName;
//use this to get creators email?
int creatorID = Node.GetCurrent().CreatorID;
umbraco.library.SendMail(
EmailAddress,
"[email protected]",
"Content Feedback",
string.Format("Hello {0}, You received feedback on {1} page ({2}): {3}.", creatorName, pageName, pageURL, Comment),
false);
}
Get page creator email address
Is it possible to get email address of page creator? We have a contact form on each page and we'd like notifications to be sent to the person who created the page but I'm having issues finding a way to return the creator's email address. I can get their id and name but not email address. I can see you can can also get id by email so not being able to do it the other way round is a real shame.
I'm trying to do it using contour code fist on Submit
Have you tried with the username (property "creatorName") and call .FindByUsername or .FindMembersByDisplayName?
https://our.umbraco.org/documentation/Reference/Management-v6/Services/MemberService
Thank you Per! I couldn't get my head around it but your suggestion worked like a charm. Off to perform little victory dance now haha... Thanks again!
is working on a reply...