public function updateUser($username, $passwd = null, $active = null, $extra = null)
    {
        $userDocument         = new User();
        $userDocument->active = $active;
        if (null !== $passwd) {
            $userDocument->passwd = $passwd;
        }
        if (null !== $active) {
            $userDocument->active = $active;
        }
        if (null !== $extra) {
            $userDocument->extra = $extra;
        }

        $url = UrlHelper::buildUrl(Urls::URL_USER, [$username]);
        $this->getConnection()->patch($url, $this->json_encode_wrapper($userDocument->getAll()));

        return true;
    }