# Get a related entries author in a plugin

Very new to plugin stuff and taking baby steps so forgive me if this is obvious.

I have a simple notification service set up to send an email to the author of an entry (front end submitted) when it is saved.

This simply sends the email to $entry->author The entry that gets submitted also has a related entry field and I'd like to send the author of that entry an email as well, but I'm not sure how I'd get access to them? Any pointers? ## 1 Answer Something like this should do it: // Grab an entry.$entry = craft()->entries->getEntryById(4);

// The current entry's author.
$originalAuthor =$entry->getAuthor();

// This is assuming your Entries field is called "relatedEntry"
$relatedEntry =$entry->relatedEntry->first();

// Make sure one was selected.
if ($relatedEntry) { // The related entry's author.$relatedEntryAuthor = \$relatedEntry->getAuthor();
}