Open giulianoviale opened 2 years ago
Could you post the code snippet you have tried? Also, at this point it is not clear from your wording what are you actually trying to acheive.
I want to know if this is possible, searching with .Search passing the string of the email, knowing this I can get the ID for the parameter of the .Users.Delete() method
Does it throw any exception?
None
you understand what i wanna accomplish? maybe i can express myself better
There should be no problem if you pass the email in the Search
of UsersQueryBuilder
. However, the Wordpress REST api only returns the users which have created at least one post, page or category (or so to say any kind of content in Wordpress). If the user you are searching for hasn't created anything in Wordpress, then it will not be returned in the result.
im trying that , it retrieves all mi clients but doesnt give the their emails , i have something like 2769 users and only retrieve 10 with the email propertie
Can you lead me to some example of the use of the Search in the query builder?
The result of UsersQueryBuilder
is paginated by default. It gives 10 results for one request. You can set the Page
and PerPage
properties of UsersQueryBuilder
to loop through and retrieve all users. Max value for PerPage
is 100. So, one query can return at max 100 users.
Please give me more information of the Search sentence and how to do it
You can have a look at the REST api reference from Wordpress: https://developer.wordpress.org/rest-api/
My general advice would be to first try the query builder. If you get a specific exception and problem then it would be easier to help you.
I dont have any exception or problem, i just wanna retrieve and save all the users from the query that i´ve build, i dont know how to make a for each of the 10 pages that retrieve me 100 users each one, if you can help me with that it would be all that i need at the moment
Use a for loop and increment the Page
property for each iteration of for loop.
Have a look here: https://github.com/wp-net/WordPressPCL/issues/297#issuecomment-1056736599
Thank you, i´ll be updating you from this
JWT Authentication for WP REST API is configured correctly, when i want to do the .RequestJWToken method it throws me that error, on line 35
Try generating JWT token using Postman. If it doesn’t generate token there, then the JWT plugin is not configured properly.
Try generating JWT token using Postman. If it doesn’t generate token there, then the JWT plugin is not configured properly.
i´ve installed the plugin jwt and configured the wp_config.php file , im gonna try to do what you´ve told me
Try generating JWT token using Postman. If it doesn’t generate token there, then the JWT plugin is not configured properly.
i´ve installed the plugin jwt and configured the wp_config.php file , im gonna try to do what you´ve told me
it works
So, atleast the plugin is configured correctly. You must remove the image as it has your credentials. I would suggest you to check the base url that you are passing to the wordpress client on construction. Maybe it’s wrong and you are getting errors for that.
"You must remove the image as it has your credentials." i dont undestand that the url that im passing is this one: https://portal21uat.hrfactors.online/wp-json
"You must remove the image as it has your credentials." i dont undestand that the url that im passing is this one: https://portal21uat.hrfactors.online/wp-json
Any news about this issue? i think that the url works fine but i cant do the conection, how can i notice if the url works or not?
I´ve check everything(including the wordpresspcl source code) and found nothing wrong
Hello! im having trouble when I want to delete a client .. when i wanna make a query to search for the user with an email string parameter to know if the user exist it doesnt work , any advise?