cloud-py-api / nc_py_api

Nextcloud Python Framework
https://cloud-py-api.github.io/nc_py_api/
Other
84 stars 4 forks source link

Can't set the display name while creating a new user #239

Closed derekbuckley closed 5 months ago

derekbuckley commented 5 months ago

Describe the bug

Creating a new user sets both the id and the display name to the supplied id. However, when I tried: curl -X POST https://admin:secret@nextcloud_url/ocs/v1.php/cloud/users -d userid="id" -d displayName="Display Name" -d email="email@domain.com" -H "OCS-APIRequest: true" I was successful.

Steps/Code to Reproduce

from nc_py_api import Nextcloud
nc = Nextcloud(nextcloud_url='example.com', nc_auth_user='user', nc_auth_pass='password')
nc.users.create('id', 'Display Name', email='email@domain.com')

Expected Results

A user is created with the supplied id and display name

Actual Results

A user is created but its id and display name are both 'id' and the supplied display name is ignored

Setup configuration

nc_py_api = 0.12 nextcloud = 28.0.3

bigcat88 commented 5 months ago

Thank you very much for letting know about this bug.

Indeed, there is such a problem - it will be fixed today.