Sets  the author that will be used when committing the transaction

@param   string|null     $author      The author
@return  Transaction
424231
public function setAuthor($author)
    {
        if ($author === null) {
            $this->author    = null;
        } else {
            $this->author    = (string)$author;
        }
        return $this;
    }
899382
public function setAuthor(Author $author)
    {
        $this->attachment['author_name'] = $author;

        if ($author->hasIcon()) {
            $this->attachment['author_icon'] = $author->getIcon();
        }

        if ($author->hasLink()) {
            $this->attachment['author_link'] = $author->getLink();
        }

        return $this;
    }
239446
public function setContributor($contributor)
    {
        ObjectHelper::isInstanceOf($contributor, [Organization::class, PersonInterface::class]);
        
        $this->_contributor = $contributor;
        return $this;
    }
649177
public function setUser($user = null)
    {
        $this->user = null;

        if (!$user = $this->internalResolveUser($user)) {
            $this->user = $this->userId = null;
        } else {
            $this->userId = $user->id;
            $this->user = $user;
        }

        return $this;
    }
2750
public function byAuthor(string $author): self
    {
        if (!strstr($author, '@')) {
            $this->author = 'nospam@example.com (' . $author . ')';
        } else {
            $this->author = $author;
        }

        return $this;
    }
999666
public function addAuthor(string $name = null, string $email = null)
    {
        is_null($name) and $name = '';
        is_null($email) and $email = '';

        if (empty($name) and empty($email)) {
            throw new AuthorNoDataException();
        }

        if (!empty($email)) {
            $author = trim(sprintf(self::FORMAT_AUTHOR, $name, $email));
        } else {
            $author = trim($name);
        }

        $this->authors[] = $author;

        return $this;
    }
701504
public function authors( $author, $post ) {
		$authors = array();
		$cauthors = get_coauthors($post->ID);
		foreach ( $cauthors as $author ) {
			$uid = $this->get_user_uid( $author );
			if ( $uid ) {
				$authors[] = new \Timber\User($uid);
			} else {
				$authors[] = new CoAuthorsPlusUser($author);
			}
		}
		return $authors;
	}
843450
public String checkBlackListCommitAuthor(String author) {
        Set<String> authors = getBlacklistedCommitAuthors();
        authors.remove("");

        Map<Pattern, String> skipPatterns = new HashMap<Pattern, String>();
        for (String s : authors) {
            s = s.trim();
            if (compilePattern(s).matcher(author).matches()) {
                return s;
            }
        }
        return null;
    }
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;
    }
456597
public function setUser($user)
    {

        // Clear cache
        $this->user = null;

        // Find element
        if (!$user = $this->findUserElement($user)) {
            // Clear property / cache
            $this->userId = $this->user = null;
        } else {
            // Set property
            $this->userId = $user->getId();

            // Set cache
            $this->user = $user;
        }

        return $this;
    }
429172
protected function setAuthors($docBlock, $authors)
    {
        $newAuthors = array_unique(array_values($authors));
        $lines      = \explode("\n", $docBlock);
        $lastAuthor = 0;
        $indention  = ' * @author     ';
        $cleaned    = [];

        foreach ($lines as $number => $line) {
            if (\strpos($line, '@author') === false) {
                continue;
            }
            $lastAuthor = $number;
            $suffix     = \trim(\substr($line, (\strpos($line, '@author') + 7)));
            $indention  = \substr($line, 0, (\strlen($line) - \strlen($suffix)));

            $index = $this->searchAuthor($line, $newAuthors);

            // Obsolete entry, remove it.
            if (false === $index) {
                $lines[$number] = null;
                $cleaned[]      = $number;
            } else {
                unset($newAuthors[$index]);
            }
        }

        $lines = $this->addNewAuthors($lines, $newAuthors, $cleaned, $lastAuthor, $indention);

        return \implode("\n", \array_filter($lines, function ($value) {
            return null !== $value;
        }));
    }
865002
public function addCopyLeft($author, $pattern)
    {
        if (\is_array($pattern)) {
            foreach ($pattern as $singlePattern) {
                $this->addCopyLeft($author, $singlePattern);
            }

            return $this;
        }

        $this->copyLeft[$this->arrayKey($author)][$this->arrayKey($pattern)] = $pattern;
        $this->copyLeftReal[$this->arrayKey($author)]                        = $author;

        return $this;
    }
88161
public function setOwner($owner)
    {
        $this->owner = $owner instanceof SID ? $owner : new SID($owner);

        return $this;
    }
226544
public function addAuthors($authors)
    {
        $app = App::getInstance();

        foreach ($authors as $author) {
            $authorRecord = new ArticleAuthor();
            $authorRecord->setArticle($this)->setAuthor($author)->save();
        }
        return $authors;
    }
277727
public boolean addAuthor(String author) {
        try {
            return add(new Meta(Element.AUTHOR, author));
		} catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
    }
925495
protected function createAuthors(array $authors = null)
    {
        if (null !== $authors) {
            foreach ($authors as $index => $author) {
                $authors[$index] = $this->createAuthor(
                    new ObjectAccess($author)
                );
            }
        }

        return $authors;
    }
589786
def set_author(self):
        """"""
        try:
            self.author = self.soup.find('author').string
        except AttributeError:
            self.author = None