Unable to get username from user
See original GitHub issueHello everyone,
I was unable to get the users usernames with your api. I am using the function GetAll(True, True)
to get all users. But the username is not set in the returned User
objects.
In the documentation https://developer.wordpress.org/rest-api/reference/users/#arguments there is a context
argument, which can be either view
, embed
or edit
. I noticed, that most of the users attributes are available in the edit
context. But you can only specify to use the embed
context or not with your api. Is that the reason why I am no receiving the usernames of the users?
Thank you very much for your help!
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Unable to retrieve the user identity (userName and ...
I am trying to implement this code to process the user login but does not work. It skips the if statement in the...
Read more >aws cli - Unable to get userName because I did not specify ...
1 Answer 1 ... It should be possible to query for a user name with the user-name parameter. ... Retrieves details of the...
Read more >Unable to find my username in C:\Users
6. Go back to the C:\Users folder and see if you find your account name. 8. Uncheck the checkbox Hidden, click Apply.
Read more >Unable to get user email id after authentication
I tried adding “email” scope in the auth-service.js file & tried to retrieve this email id same way username & prof…
Read more >"This doesn't look like a valid user ID" error when ...
Make sure you typed the user ID assigned to you by your organization. It usually looks like someone@example.com or someone@example.onmicrosoft.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@MarvinKlar if you want to perform the request with special context (not view), you should use QueryBuilder. For your purpose the following code might be helpful:
so this code should return users with username property
I think this is what /me can give you.
so my question @ThomasPe is there no other ways to get current user?