Set author

@param string $author
517120
public function set_author($author) {
        $filerecord = new stdClass;
        $filerecord->author = $author;
        $this->update($filerecord);
    }
896751
public function set_user($user)
    {
        parent::set_user($user);

        $lang = $this->language_prop($this->config->get('language', $_SESSION['language']));
        $_SESSION['language'] = $this->user->language = $lang;

        // set localization
        setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8');

        // Workaround for http://bugs.php.net/bug.php?id=18556
        // Also strtoupper/strtolower and other methods are locale-aware
        // for these locales it is problematic (#1490519)
        if (in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) {
            setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8', 'C');
        }
    }
975315
public function addAuthor($name=null, $user=null, $email=null)
    {
        $this->_authors[] = array(
            'name' =>$name,
            'user' =>$user,
            'email'=>$email
        );
        $author = $this->_packageXml->authors->addChild('author');
        $author->addChild('name', $name);
        $author->addChild('user', $user);
        $author->addChild('email', $email);
        return $this;
    }
29750
public function setUser($username)
    {
        $app = App::getInstance();

        try {
            parent::__construct($username);
        } catch (\FelixOnline\Exceptions\ModelNotFoundException $e) {
            User::createUser($username);
            parent::__construct($username);
        }

        $user = new User($username);
        $this->logIn($user);
        $this->user = $user;
    }
731637
public void setAuthor(String v) {
    if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_author == null)
      jcasType.jcas.throwFeatMissing("author", "de.julielab.jules.types.ace.SourceFile");
    jcasType.ll_cas.ll_setStringValue(addr, ((SourceFile_Type)jcasType).casFeatCode_author, v);}
778876
public function setProperty(NodeInterface $node, \DOMElement $element) : void
    {
        if ($node instanceof ItemInterface) {
            $author = $node->newAuthor();
            $author->setName($element->nodeValue);
            $node->setAuthor($author);
        }
    }
717300
public function setUser(\Concrete\Core\Entity\User\User $user)
    {
        $this->author = $user;
        $this->save();
    }
1129208
public function setAuthorLink($author_link): self
    {
        return $this->setAuthor($this->author_name, $author_link, $this->author_icon);
    }
841195
public function setWriter(\Parable\Log\Writer\WriterInterface $writer)
    {
        $this->writer = $writer;
        return $this;
    }
420371
def set_itunes_author_name(self):
        """"""
        try:
            self.itunes_author_name = self.soup.find('itunes:author').string
        except AttributeError:
            self.itunes_author_name = None
784814
public function offsetSet($offset, $value)
    {
        if (!$value instanceof Author) {
            throw new InvalidArgumentType(
                '$value',
                'eZ\\Publish\\Core\\FieldType\\Author\\Author',
                $value
            );
        }

        $aAuthors = $this->getArrayCopy();
        parent::offsetSet($offset, $value);
        if (!isset($value->id) || $value->id == -1) {
            if (!empty($aAuthors)) {
                $value->id = end($aAuthors)->id + 1;
            } else {
                $value->id = 1;
            }
        }
    }
614180
private function setAuthorData()
    {
        $this->Author = trim($this->Author);
        $nameParts = explode(' ', $this->Author);
        foreach ($nameParts as $key => $namePart) {
            if ($namePart === '') {
                unset($nameParts[$key]);
            }
        }
        $this->Author = implode(' ', $nameParts);
        /** @var AuthorHelper $author */
        $author = AuthorHelper::get()->filter('OriginalName', trim($this->Author));
        if (!$author->Count()) {
            $author = AuthorHelper::create();
            $author->OriginalName = trim($this->Author);
            $author->write();
        } else {
            $author = $author->first();
        }
        $this->AuthorHelperID = $author->ID;
    }
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;
    }
802332
protected function setAuthors($json, $authors)
    {
        // If no author set yet, use the first one as author.
        if (!isset($json['author'])) {
            $json['author'] = \array_shift($authors);
        }
        $maintainer = $this->convertAuthor($json['author']);

        foreach ($authors as $author) {
            $converted = $this->convertAuthor($author);

            // Ignore the maintainer here.
            if ($converted['email'] === $maintainer['email']) {
                continue;
            }

            $json['contributors'][] = $converted;
        }

        return $json;
    }
1048227
protected function setCurrentUser($user) {
		
		if (is_a($user,'Pair\User')) {

			$this->currentUser = $user;
			
			// sets user language
			$tran = Translator::getInstance();
			$tran->setLocale($user->getLocale());
				
		}

	}
150826
public function setUser($user)
    {
        $regex = '`^' . self::$_regexUser . '$`i';

        if (preg_match_all($regex, $user, $matches) !== 1) {

            throw new InvalidArgumentException('User must match ' . $regex);
        }

        $this->_user = $user;
    }
233292
public function setUser(User $user): void
    {
        $this->user = $user;
        $this->user->setAcl($this);

        $userRole = $this->user->getRole();
        if ($userRole != null && !empty($this->rules)) {
            foreach ($this->rules as $role => $rules) {
                if ($userRole == $role) {
                    foreach ($rules as $uri => $rules) {
                        $this->user->setPermissionsOf($uri, (array) explode(',', $rules) /* 'read,write' etc. */);
                    }
                    break;
                }
            }
        }
    }