How can we help you today?
Enter your search term here...
to submit a new ticket
Check ticket status
Start a new topic
request.body.userid or getAuthenticatedUserID()?
started a topic
almost 6 years ago
On BL there are 2 ways to get the username of the user that sent the request, but no way to get its _id.
The username is stored in request.body.username
and is also given by calling modules.backendContext.getAuthenticatedUsername().
"user" though is the only collection that doesn't use "_id" as default key, but "username".
This makes it a bit hard to standardize functions and I often have to write selections statements like "if(obj._id) ... else if (obj.username) ..."
Would it be possible to get the user "_id" rather than the username only?
I proposed request.body.userid or getAuthenticatedUserID() just so have something similar to what already exists, but it could also be something else :wink:
Otherwise, is there already a way to get the user id without querying the "user" collection?
Thank you :)
over 5 years ago
Davide, I don't have information on how the final implementation will look at this time, but this feature is already being worked on as we speak. You should expect to see this being rolled out sometime by early - mid next week. Thanks,
over 5 years ago
cool! :) :) :) looking fwd to it.
to post a comment
More topics in
Does kinvey have support for returning gzipped compressed data using the AndroidSDK?
Python SDK for Business Logic on App Engine
Prevent creation of new collections through POST requests
Improved Documentation for BL - Specifically collectionAccess Module
Allow Control Click in Console
Ruby on Rail SDK
See all 56 topics