I've never heard of this issue before. We need the @gmail.com portion in case folks log in with their Google Apps accounts.
It might be a bit more inconvenient, but can you store the user ID instead? UserProperty should probably be deprecated in favor of this - we considered forward migrating this but were afraid it would break backwards compatibility. On Fri, Sep 17, 2010 at 4:59 PM, gwstuff <[email protected]> wrote: > Hello, > > We have been facing a really strange problem involving the > UserProperty() property. We have an entity type PR: > > class PR(db.Model): > user = db.UserProperty() > ... > > The way we retrieve these entities is through queries of this kind: > > pr = PR.gql('WHERE user=:1',current_user) > > ...where current_user is fetched using the call > users.get_current_user() > > This works 99% of the time, but every now and then a user can't get in > even though he has a PR record with his user tacked to it. AFAIK, this > only happens to people with @gmail.com addresses. Further > investigation revealed that this is because the property in the > database has its email() field set to the user id without > '@gmail.com'. So USER(email='x.y') == USER('email='[email protected]') > evaluates to False. > > The funny thing is that even when we reset all such addresses and add > the @gmail.com suffix, this suffix disappears periodically, and the > problem comes back and locks these people out. We do not manually > construct user objects at any time - we always call get_current_user() > so our hope was that whatever the convention is would stay consistent > across all of our operations. > > Has anyone faced this issue, or either way, have any suggestions? > > Sincerely, > Z > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
