public function update($id, array $params)
    {
        $defaults = [
            'id' => $id,
            'login' => null,
            'password' => null,
            'lastname' => null,
            'firstname' => null,
            'mail' => null,
        ];
        $params = $this->sanitizeParams($defaults, $params);

        $xml = new \SimpleXMLElement('<?xml version="1.0"?><user></user>');
        foreach ($params as $k => $v) {
            if ('custom_fields' === $k) {
                $this->attachCustomFieldXML($xml, $v);
            } else {
                $xml->addChild($k, $v);
            }
        }

        return $this->put('/users/'.$id.'.xml', $xml->asXML());
    }