views:

36

answers:

1

In GAE, can you look up a User with the User object's user_id?

In other words, is there something equivalent to:

from google.appengine.api.users import User

user = User.get_by_id(user_id)

Thank you for reading.

Brian

+5  A: 

I don't think so. ... they certainly wouldn't just give you access to every holder of a google account!

The idea is that you store user ids as properties in your datastore, once they've logged in to your app.

There is a property type called UserProperty

http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html

So, you can query your list of users from your own datastore definition.

hth

amir75
@amir75: Great point re. access.
Brian M. Hunt