public function addUser($username, $passwd = null, $active = null, $extra = null)
    {
        $userDocument         = new User();
        $userDocument->user   = $username;
        $userDocument->passwd = $passwd;
        $userDocument->active = $active;
        $userDocument->extra  = $extra;
        $data                 = $userDocument->getAll();

        $this->getConnection()->post(Urls::URL_USER, $this->json_encode_wrapper($data));

        try {
            // additionally set user permissions in the current databases
            $this->grantPermissions($username, $this->getConnection()->getDatabase());
        } catch (\Exception $e) {
        }

        return true;
    }