src/Model/Project.php
public function addUser($user, $role, $byUuid = false)
    {
        $property = $byUuid ? 'user' : 'email';
        $body = [$property => $user, 'role' => $role];

        return ProjectAccess::create($body, $this->getLink('access'), $this->client);
    }
public function addUser($user, $role, $byUuid = false)
    {
        $property = $byUuid ? 'user' : 'email';
        $body = [$property => $user, 'role' => $role];

        return ProjectAccess::create($body, $this->getLink('access'), $this->client);
    }
public function addUser ( $ user , $ role , $ byUuid = false ) { $ property = $ byUuid ? 'user' : 'email' ; $ body = [ $ property => $ user , 'role' => $ role ] ; return ProjectAccess :: create ( $ body , $ this -> getLink ( 'access' ) , $ this -> client ) ; }
Add a new user to a project.

@param string $user   The user's UUID or email address (see $byUuid).
@param string $role   One of ProjectAccess::$roles.
@param bool   $byUuid Set true if $user is a UUID, or false (default) if
$user is an email address.

Note that for legacy reasons, the default for $byUuid is false for
Project::addUser(), but true for Environment::addUser().

@return Result
Add a new user to a project .