src/Keboola/Writer/GoodData/Client.php
public function createUser($writerId, $email, $password, $firstName, $lastName, $queue = 'primary')
    {
        $job = $this->createUserAsync($writerId, $email, $password, $firstName, $lastName, $queue);
        if (!isset($job['url'])) {
            throw new ServerException('Create user job returned unexpected result: ' . json_encode($job, JSON_PRETTY_PRINT));
        }

        $result = $this->waitForJob($job['url']);
        if (!isset($result['result'][0]['uid'])) {
            throw new ServerException('Job info for create user returned unexpected result: ' . json_encode($result, JSON_PRETTY_PRINT));
        }

        return ['uid' => $result['result'][0]['uid']];
    }
public function createUser($writerId, $email, $password, $firstName, $lastName, $queue = 'primary')
    {
        $job = $this->createUserAsync($writerId, $email, $password, $firstName, $lastName, $queue);
        if (!isset($job['url'])) {
            throw new ServerException('Create user job returned unexpected result: ' . json_encode($job, JSON_PRETTY_PRINT));
        }

        $result = $this->waitForJob($job['url']);
        if (!isset($result['result'][0]['uid'])) {
            throw new ServerException('Job info for create user returned unexpected result: ' . json_encode($result, JSON_PRETTY_PRINT));
        }

        return ['uid' => $result['result'][0]['uid']];
    }
public function createUser ( $ writerId , $ email , $ password , $ firstName , $ lastName , $ queue = 'primary' ) { $ job = $ this -> createUserAsync ( $ writerId , $ email , $ password , $ firstName , $ lastName , $ queue ) ; if ( ! isset ( $ job [ 'url' ] ) ) { throw new ServerException ( 'Create user job returned unexpected result: ' . json_encode ( $ job , JSON_PRETTY_PRINT ) ) ; } $ result = $ this -> waitForJob ( $ job [ 'url' ] ) ; if ( ! isset ( $ result [ 'result' ] [ 0 ] [ 'uid' ] ) ) { throw new ServerException ( 'Job info for create user returned unexpected result: ' . json_encode ( $ result , JSON_PRETTY_PRINT ) ) ; } return [ 'uid' => $ result [ 'result' ] [ 0 ] [ 'uid' ] ] ; }
Create user and wait for finish, returns user's uid
@param $writerId
@param $email
@param $password
@param $firstName
@param $lastName
@param string $queue primary|secondary
@throws ServerException
@return array
Create user and wait for finish returns user s uid