-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User.get_user doesn't work #39
Comments
Could you please clarify what you mean by |
The nextcloud API documentation leaves quite a bit to be desired. I found the url by looking in my apache logs and watching what the desktop client was doing. I was trying to get my user id as on systems using ldap the user id is a random uuid and not the username one uses to login with. I tried to do
I did find the php routes file that defines it. ['root' => '/cloud', 'name' => 'Users#getUser', 'url' => '/users/{userId}', 'verb' => 'GET'],
['root' => '/cloud', 'name' => 'Users#getCurrentUser', 'url' => '/user', 'verb' => 'GET'], |
Hi,
I needed to look up my user id because I'm using LDAP and my user id is a UUID generated by nextcloud and not my user name.
Unfortunately User.get_user() doesn't work because the OCS end point for information about a user is:
/ocs/v1.php/cloud/user
But the User class's end point is:
/ocs/v1.php/cloud/users
(with an S)
I tested on nextcloud 13.0.4 and 15.0.7
I'd guess the solution is to rename the current class to Users and add a new class User that points to the '/ocs/v1.php/cloud/user endpoint and move the get_user function to it.
Also it'd be super convenient if commands that took a uid could default to the logged in user.
The text was updated successfully, but these errors were encountered: