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']];
    }