As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
PD: in query 1, the 3th line userQuery.userId = nil not apply. This line is commented
B
Billy Gee
said
almost 7 years ago
Hello Rodrigo,
Kinvey does not all the app to query the Users collection for all users. This would be a security risk.
Can you tell us about your use case and why you are trying to do this from the app.
Regards,
Billy
R
Rodrigo Astorga Espinoza
said
almost 7 years ago
The purpose of the app is to perform a performance evaluation of other users as well as themselves. For that, I would like to make a query to the users table. Then, I would like to select one of them from the above mentioned query and perform the evaluation, registering the evaluation in a collection called "Evaluation" that should have the user evaluator (activeUser), the user to evaluate (Obtained from the query To the collection "users"), and other extra data.
B
Billy Gee
said
almost 7 years ago
Hello Rodrigo,
Thank you for your quick reply.
Let me repeat your use case in another way to make sure that I understand. You want an app user to be able to get a list of all other app users (using the aforementioned all-user query). Then you want the app user to select any one of the users from the list of Kinvey Users and perform an evaluation on them and then send the evaluation to Kinvey to be stored in a different collection, is that correct?
Will the "Evaluator" user have a requirement to modify the Kinvey User record for the "Evaluated" user in any way.
We would like to know the name of this app and the KID for the environment that you are working in, however we don't want you to post it in this Forum. Can you please send it to billy@kinvey.com so that it is kept private?
Someone will take a closer look at your above queries and errors as soon as you respond with the specific KID and environment name.
Rodrigo Astorga Espinoza
Hello everyone!
I'm new to Kinvey and would like to know how to perform a query to get all available users from the "users" collection.
PS: I need to know for other users to send evaluations or information.
I've tried the following:
1. if let user = Kinvey.sharedClient.activeUser {
let userQuery = UserQuery()
userQuery.userId = nil
user.lookup(userQuery){ (usersKV, error) in
if let usersKV = usersKV {
//success
print("Users: \(usersKV)")
self.users = usersKV
} else {
print(error!)
//fail
}
}
}
this throws me an error: unknownJsonError
2. let dataStoreUsers = DataStore<User>.collection()
dataStoreUsers.find() { usersKV, error in
if let usersKV = usersKV {
//succeed
print("Users: \(usersKV)")
self.users = usersKV
} else {
print("error: \(error!)")
//fail
}
}
this throws me an error in DataStore<User>.collection(): Type 'User' does not conform to protocol 'Persistable'
Rodrigo,
Did you get a chance to review Billy's earlier comment?
Secondly, in your code, if you lookup the user providing an email address, does that work for you?
Here is how the query will look like:
Also, you can create your tickets on the support portal as you are a paying customer. Kinvey forum is for free customers.
https://support.kinvey.com/support/tickets/new
Thanks,
Pranav
Kinvey Support
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstPranav J
Rodrigo,
What is the Kinvey SDK version that you are using?
Check following link for the latest SDK
http://devcenter.kinvey.com/ios/downloads#
Thanks,
Pranav
Kinvey Support
Rodrigo Astorga Espinoza
the version is 3.3.4
PD:
the query that I made in number 1 was:
1. if let user = Kinvey.sharedClient.activeUser {
let userQuery = UserQuery()
user.lookup(userQuery){ (usersKV, error) in
if let usersKV = usersKV {
//success
print("Users: \(usersKV)")
self.users = usersKV
} else {
print(error!)
//fail
}
}
}
this throws me an error: unknownJsonError
Rodrigo Astorga Espinoza
the version is 3.3.4 with cocoapod
PD: in query 1, the 3th line userQuery.userId = nil not apply. This line is commented
Billy Gee
Hello Rodrigo,
Kinvey does not all the app to query the Users collection for all users. This would be a security risk.
Can you tell us about your use case and why you are trying to do this from the app.
Regards,
Billy
Rodrigo Astorga Espinoza
The purpose of the app is to perform a performance evaluation of other users as well as themselves. For that, I would like to make a query to the users table. Then, I would like to select one of them from the above mentioned query and perform the evaluation, registering the evaluation in a collection called "Evaluation" that should have the user evaluator (activeUser), the user to evaluate (Obtained from the query To the collection "users"), and other extra data.
Billy Gee
Hello Rodrigo,
Thank you for your quick reply.
Let me repeat your use case in another way to make sure that I understand. You want an app user to be able to get a list of all other app users (using the aforementioned all-user query). Then you want the app user to select any one of the users from the list of Kinvey Users and perform an evaluation on them and then send the evaluation to Kinvey to be stored in a different collection, is that correct?
Will the "Evaluator" user have a requirement to modify the Kinvey User record for the "Evaluated" user in any way.
We would like to know the name of this app and the KID for the environment that you are working in, however we don't want you to post it in this Forum. Can you please send it to billy@kinvey.com so that it is kept private?
Someone will take a closer look at your above queries and errors as soon as you respond with the specific KID and environment name.
Regards,
Billy Gee
Pranav J
Rodrigo,
Did you get a chance to review Billy's earlier comment?
Secondly, in your code, if you lookup the user providing an email address, does that work for you?
Here is how the query will look like:
Also, you can create your tickets on the support portal as you are a paying customer. Kinvey forum is for free customers.
https://support.kinvey.com/support/tickets/new
Thanks,
Pranav
Kinvey Support
Rodrigo Astorga Espinoza
thanks for reply. Finally I used business logic (Custom Endpoint) for my query.
KID is kid_B1RFK021l and the name of app is "Desempeño".
Also, I made some changes to the model so I didn't have to ask directly to the users table.
thanks very much.
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics