Pregunta

Is user_id() unique for all time?

That is, even if a Google Account is deleted, the user_id() of that deleted account will never appear again in any other user_id, right?

We are clarifying our understanding of this statement from http://code.google.com/appengine/docs/python/users/userclass.html#User_user_id

user_id()

If the email address is associated with a Google account, user_id returns the unique permanent ID of the user, a string. This ID is always the same for the user regardless of whether the user changes her email address.

¿Fue útil?

Solución

Yes it is. It is a String of digits that is immutable to your email changes etc. Other properties such as email, nickname and other properties are mutable.

EDIT

It is unique!

From https://developers.google.com/appengine/docs/python/users/userobjects

The User object for a valid user can provide a unique ID value for the user that stays the same even if the user changes her email address. The user_id() method returns this ID, a str value.

The User object has the same form no matter which method of authentication your app uses. If you switch authentication options from Google Accounts to OpenID, existing User objects in the datastore are still valid.

Also take care beacuse the UserProperty is mutable as well as discussed.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top