Asks the author name and e-mail and returns them

@return array
969720
protected function requestAuthor()
    {
        if (!empty($this->getComposerData()->authors)) {
            return $this->selectAuthors();
        }

        $nameQuestion = new Question('Please enter your name: ');
        $emailQuestion = new Question('Please enter your e-mail address: ');
        $this->getOutput()->writeln('');
        $this->getOutput()->writeln(
            '<info>Cannot determine the developer name ' .
            'from project\'s composer.json file.</info>'
        );
        $this->getOutput()->writeln(
            "<comment>To automatically set the developer's " .
            "name and e-mail and avoid entering it on every generate:* " .
            "commands set the authors entry on your project's " .
            "composer.json file.</comment>"
        );
        $authorName = $this->getQuestionHelper()->ask(
            $this->getInput(),
            $this->getOutput(),
            $nameQuestion
        );
        $authorEmail = $this->getQuestionHelper()->ask(
            $this->getInput(),
            $this->getOutput(),
            $emailQuestion
        );
        return compact('authorName', 'authorEmail');
    }
1255978
public function getMailFields()
    {
        $result['project']              = $this->getName();
        $result['project_bcc']          = $this->getEmailBcc();
        $result['project_description']  = $this->getDescription();
        $result['project_from']         = $this->getFrom();

        return $result;
    }
7305
public function get_authors()
	{
		$authors = array();
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author)
		{
			$name = null;
			$uri = null;
			$email = null;
			if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
			{
				$name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
			{
				$uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
			}
			if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
			{
				$email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			if ($name !== null || $email !== null || $uri !== null)
			{
				$authors[] = $this->registry->create('Author', array($name, $uri, $email));
			}
		}
		if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
		{
			$name = null;
			$url = null;
			$email = null;
			if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
			{
				$name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
			{
				$url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
			}
			if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
			{
				$email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			if ($name !== null || $email !== null || $url !== null)
			{
				$authors[] = $this->registry->create('Author', array($name, $url, $email));
			}
		}
		if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'author'))
		{
			$authors[] = $this->registry->create('Author', array(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_HTML)));
		}
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author)
		{
			$authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null));
		}
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author)
		{
			$authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null));
		}
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author)
		{
			$authors[] = $this->registry->create('Author', array($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null));
		}

		if (!empty($authors))
		{
			return array_unique($authors);
		}
		elseif (($source = $this->get_source()) && ($authors = $source->get_authors()))
		{
			return $authors;
		}
		elseif ($authors = $this->feed->get_authors())
		{
			return $authors;
		}
		else
		{
			return null;
		}
	}
1255004
protected function _getAuthor()
    {
        if ($this->created_by instanceof User) {
            return $this->created_by;
        }

        return new User([
            'username' => __d('content', 'unknown'),
            'name' => __d('content', 'Unknown'),
            'web' => __d('content', '(no website)'),
            'email' => __d('content', 'Unknown'),
        ]);
    }
688361
public function serialize() {
        $r=['user'=>$this->user
            ,'name'=>$this->fullName
            ,'uid'=>$this->uid
            ,'group'=>$this->group
            ,'role'=>$this->role];
        /* optional fields */
        if ($this->email!==null) $r['email']=$this->email;
        if ($this->iduser!==null) $r['iduser']=$this->iduser;

        $r['extrafields']=$this->extraFields;

        return $r;
    }
1017564
protected function getEmailAsPdfFields()
    {
        return array(
            'emailAsPdf_cb' => array(
                'type' => 'checkbox',
                'label' => $this->t('field_emailAsPdf'),
                'description' => $this->t('desc_emailAsPdf'),
                'options' => array(
                    'emailAsPdf' => $this->t('option_emailAsPdf'),
                ),
            ),
            'emailTo' => array(
                'type' => 'email',
                'label' => $this->t('field_emailTo'),
                'description' => $this->t('desc_emailTo') . ' ' . $this->t('msg_token'),
                'attributes' => array(
                    'size' => 60,
                ),
            ),
            'emailBcc' => array(
                'type' => 'email',
                'label' => $this->t('field_emailBcc'),
                'description' => $this->t('desc_emailBcc') . ' ' . $this->t('msg_token'),
                'attributes' => array(
                    'multiple' => true,
                    'size' => 60,
                ),
            ),
            'emailFrom' => array(
                'type' => 'email',
                'label' => $this->t('field_emailFrom'),
                'description' => $this->t('desc_emailFrom') . ' ' . $this->t('msg_token'),
                'attributes' => array(
                    'size' => 60,
                ),
            ),
            'subject' => array(
                'type' => 'text',
                'label' => $this->t('field_subject'),
                'description' => $this->t('desc_subject') . ' ' . $this->t('msg_token'),
                'attributes' => array(
                    'size' => 60,
                ),
            ),
        );
    }
1073028
public function toArray()
    {
        return [
            'title'         => $this->title,
            'description'   => $this->description,
            'content'       => $this->content,
            'authors'       => array_map(function ($author) {
                                            return $author->toArray();
                                        }, isset($this->authors) ? $this->authors : []),
            'date'          => $this->date,
            'permalink'     => $this->permalink,
        ];
    }
306041
public static function get_meta_data()
    {
        $data = self::$meta_data;
        
        $defaults = array(
            'Description' => _t('DocumentationViewer.OPENSEARCHDESC', 'Search the documentation'),
            'Tags' => _t('DocumentationViewer.OPENSEARCHTAGS', 'documentation'),
            'Contact' => Config::inst()->get('Email', 'admin_email'),
            'ShortName' => _t('DocumentationViewer.OPENSEARCHNAME', 'Documentation Search'),
            'Author' => 'SilverStripe'
        );
        
        foreach ($defaults as $key => $value) {
            if (isset($data[$key])) {
                $defaults[$key] = $data[$key];
            }
        }
        
        return $defaults;
    }
802392
private function fetchLoggedAuthor(): Author
    {
        $author = new Author();

        try {
            $permissionResolver = $this->repository->getPermissionResolver();
            $userService = $this->repository->getUserService();
            $loggedUserId = $permissionResolver->getCurrentUserReference()->getUserId();
            $loggedUserData = $userService->loadUser($loggedUserId);

            $author->name = $loggedUserData->getName();
            $author->email = $loggedUserData->email;
        } catch (NotFoundException $e) {
            //Do nothing
        }

        return $author;
    }
1342954
public function getMemberDetails()
    {
        if ($user = $this->ChangedBy()) {
            $name = $user->getTitle();
            if ($user->Email) {
                $name .= " <$user->Email>";
            }
            return $name;
        }
    }
860078
public function toArray()
    {
        return [
            'id' => $this->id,
            'author_name' => $this->authorName,
            'author_email' => $this->authorEmail,
            'committer_name' => $this->committerName,
            'committer_email' => $this->committerEmail,
            'message' => $this->message,
        ];
    }
1111513
def author_name(author):
    

    if not '@' in author:
        return author
    else:
        return author.replace(author_email(author), '').replace('<', '')\
            .replace('>', '').strip()
383386
public function get_contributors()
	{
		$contributors = array();
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor)
		{
			$name = null;
			$uri = null;
			$email = null;
			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
			{
				$name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
			}
			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data']))
			{
				$uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]));
			}
			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data']))
			{
				$email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
			}
			if ($name !== null || $email !== null || $uri !== null)
			{
				$contributors[] = $this->registry->create('Author', array($name, $uri, $email));
			}
		}
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor)
		{
			$name = null;
			$url = null;
			$email = null;
			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data']))
			{
				$name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
			}
			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data']))
			{
				$url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]));
			}
			if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data']))
			{
				$email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
			}
			if ($name !== null || $email !== null || $url !== null)
			{
				$contributors[] = $this->registry->create('Author', array($name, $url, $email));
			}
		}

		if (!empty($contributors))
		{
			return array_unique($contributors);
		}
		else
		{
			return null;
		}
	}
303129
public function getUsersAjax()
    {
        if (!$this->access('user')) {
            return array('error' => $this->text('No access'));
        }

        $options = array(
            'email_like' => $this->getPosted('term'),
            'store_id' => $this->getPosted('store_id'),
            'limit' => array(0, $this->config('autocomplete_limit', 10)));

        return $this->user->getList($options);
    }
429210
protected function getResetPasswordMailFields()
    {
    	if ($this->user->getUserId()) {
    		$result = $this->user->getResetPasswordMailFields();
    	} else {
    		$result['reset_key'] = '';
        	$result['reset_url'] = '';

    	}
    	return $result;
    }
469176
public function getMailHeaders()
    {
        $headers = [];

        $html = $this->getHtml();
        $text = $this->getText();
        $subject = $this->getSubject();

        if ($html != "" || count($this->attachments) > 0) {
            $mime = new MimeDocument("multipart/alternative", crc32($html) . crc32($text) . crc32($subject));
            $headers = $mime->getHeaders();
        } else {
            $headers["Content-Type"] = "text/plain; charset=utf-8";
        }

        $headers["From"] = (string)$this->getSender();
        $headers["Subject"] = $subject;

        return $headers;
    }
215868
def author_names(self):
        
        return {"%s$$n%i" % (author.get_urn(), i): name[1]
                for author in self.get_authors()
                for i, name in enumerate(author.get_names())
                if author.get_urn() is not None}