Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mam 5 posts 75 karma points
    Aug 10, 2015 @ 14:33
    Mam
    0

    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

    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);
    }
    
  • Per Olsson 47 posts 307 karma points
    Aug 10, 2015 @ 14:44
    Per Olsson
    0

    Have you tried with the username (property "creatorName") and call .FindByUsername or .FindMembersByDisplayName?

    https://our.umbraco.org/documentation/Reference/Management-v6/Services/MemberService

  • Mam 5 posts 75 karma points
    Aug 10, 2015 @ 15:19
    Mam
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft