The newest App Engine SDK (1.2.1) has an API call to compute an ID for a user account based on his email address. (The ID remains the same even if the user changes his addr
To make the proposed solution work with NDB, just add use_cache=False, use_memcache=False to the get method. That is:
obj = key.get(use_cache=False, use_memcache=False)
This guarantees getting the entity from the Datastore with the user_id param populated (only if this is a valid Google account).
The current workaround is to create a User object, store it to the datastore, and fetch it again. If the email corresponds to a valid Google account, the User object in the returned entity will have its user_id field populated.