bpcurse / nextcloud-userexport

PHP script to export and filter lists (users, groups and groupfolders) using different Nextcloud APIs
The Unlicense
12 stars 3 forks source link

Usernames with spaces #21

Closed knttr closed 4 years ago

knttr commented 4 years ago

Thank you very much for this script - it gives us a better overview than the screen shots used to date...

Usernames with spaces are not listed in the table / CSV-file

The Nextcloud Documentation states:

Login names may contain letters (a-z, A-Z), numbers (0-9), dashes (-), underscores (_), periods (.) and at signs (@). After creating the user, you may fill in their Full Name if it is different than the login name, or leave it for the user to complete.

Unfortunately the User frontend allows usernames with spaces and we're stuck with these usernames.

Can the script be updated to include usernames with spaces?

bpcurse commented 4 years ago

@knttr Thank you for your feedback! Interesting case, I will check later today if the issue is in the API response or in the script.

bpcurse commented 4 years ago

Could you please provide the following additional information:

Thank you!

bpcurse commented 4 years ago

@knttr The additional info isn't necessary any more. I could not reproduce the issue on Nextcloud 17 but I could on Nextcloud 16.

As of Nextcloud 17 the API seems to handle some improper encoding in URLs. In Nextcloud 16 it does not.

The script now encodes spaces in login IDs used for API calls properly as "%20". I have pushed a commit to master that fixes this issue and will release v0.3.1.

Feel free to reopen or file another issue if this doesn't solve the problem for you.

knttr commented 4 years ago

Thank you for the very fast response.

I can confirm that issue is resolved with the release v0.3.1. (We are using Nextcloud 17.0.2)