Any feedback on this?

On Apr 14, 8:12 pm, Viðar Svansson <vidarsv...@gmail.com> wrote:
> Another question, is there any way to "peak" into the corrupted entity?
> I know the ids from a query but I would like to have the data before I
> delete it.
>
>
>
>
>
>
>
> On Wed, Apr 13, 2011 at 9:30 PM, pjesi <vidarsv...@gmail.com> wrote:
> > Hi,
>
> > It seems that it is not possible to associate an entity to a User
> > instance if the user authenticated with OpenID and did not provide an
> > email.
>
> > From the docs, it seems to be possible to create a User instance
> > without an email using federated_identity:
>
> > users.User(federated_identity="http://example.com/id/ajohnson";)
> >http://code.google.com/appengine/docs/python/users/userobjects.html
>
> > So basically I can log in using OpenID, put something in the datastore
> > that references the user from users.get_current_user(), and be left
> > with a broken instance.
>
> > This is discussed in an old thread here:
> >http://groups.google.com/group/google-appengine/browse_thread/thread/...
>
> > It was suggested that if the user object does not contain an email,
> > one should ask the user from that. But can the email provided by user
> > input be used to associate him with the current user object?
>
> > I haven't found any documentation on how to fix this. Can I set the
> > email address to the user object and will that help me to lookup any
> > entities that the user created?
>
> > Example:
> > 1. User logged in using his blogger.com OpenID, no email was provided.
> > The app created a Profile instance that references that apparently
> > broken User instance.
>
> > 2.User visits a restricted page that looks up his Profile with using
> > the current_user object, the query finds the Profile entity but fails
> > to create an object because of UserNotFoundError exception.
>
> > Can the app catch this, ask the user for email, and fix the entity? If
> > so, how?
>
> > To prevent this happening in the future, can the app ask the user to
> > provide email before creating the Profile object in the first place
> > and somehow set the email so that the Profile instance will not raise
> > an exception in the future?
>
> > Thanks,
> > Viðar

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to