Set lastUser.

@param int|object $lastUser

@return $this
7632
public function setLastUser($lastUser)
    {
        if (\is_object($lastUser)) {
            $this->lastUserObject = $lastUser;
            $this->lastUser       = $lastUser->getId();
        } else {
            $this->lastUserObject = null;
            $this->lastUser       = $lastUser;
        }

        return $this;
    }
245006
public function setUser($user)
    {
        if ($user instanceof User) {
            $this->_user = $user;
            return true;
        }
        $this->_user = null;
        return false;
    }
359095
public function setLastname($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->lastname !== $v) {
            $this->lastname = $v;
            $this->modifiedColumns[] = UserPeer::LASTNAME;
        }


        return $this;
    }
154105
public function setUser($user)
    {
        $this->removeTarget();

        if ($user) {
            $this->user = (string) $user;
        }

        return $this;
    }
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;
    }
682066
public function setLastMod($lastmod)
    {
        try {
            parent::setLastMod($lastmod);
        } catch (UrlItemException $e) {
            throw new IndexItemException($e->getMessage());
        }

        return $this;
    }
872502
public function setLastName($lastName) {
        if (empty($lastName))
            throw new Exception('Lastname must be set and cannot be empty.');

        $this->lastName = trim($lastName);

        return $this;
    }
1005304
public function setUser(User $v = null)
    {
        if ($v === null) {
            $this->setUserId(NULL);
        } else {
            $this->setUserId($v->getId());
        }

        $this->aUser = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the User object, it will not be re-added.
        if ($v !== null) {
            $v->addUserRole($this);
        }


        return $this;
    }
102781
public function refreshLastPost()
    {
        /** @var Post $lastPost */
        if ($lastPost = $this->comments()->latest()->first()) {
            $this->setLastPost($lastPost);
        }

        return $this;
    }
739762
public function setLastName($lastName): Hybrid
    {
        self::validateSetLength('lastName', $lastName);
        $this->data['lastName'] = $lastName;

        return $this;
    }
421224
public function setLastMod($lastMod)
    {
        if ($lastMod instanceof \DateTime) {
            $lastMod = new LastModification($lastMod);
        }
        $this->elements[self::ELEMENT_LASTMOD] = $lastMod;

        return $this;
    }
1087525
public function setLastVisit($timestamp = 'now')
	{
		$timestamp = new Date($timestamp);

		$query = $this->getQuery()
			->update($this->getTableName())
			->set(array('lastvisitDate' => $timestamp->toSql()))
			->whereEquals('id', $this->get('id'));

		return $query->execute();
	}
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;
    }
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;
    }
717702
private function setLastName(string $lastName): FullNameEmbeddableInterface
    {
        $this->notifyEmbeddablePrefixedProperties(
            'lastName',
            $this->lastName,
            $lastName
        );
        $this->lastName = $lastName;

        return $this;
    }
896057
public function setLastname($lastname)
    {
        $lastname = ($lastname === null ? $lastname : (string) $lastname);

        if ($this->exists() && $this->lastname !== $lastname) {
            $this->updated['lastname'] = true;
        }

        $this->lastname = $lastname;

        return $this;
    }
905188
public function chown(int $user): vfsStreamContent
    {
        $this->user                  = $user;
        $this->lastAttributeModified = time();
        return $this;
    }