View source on GitHub |
Provides the email address, nickname, and ID
for a user.
Inherits From: expected_type
google.appengine.api.users.User(
email=None,
_auth_domain=None,
_user_id=None,
federated_identity=None,
federated_provider=None,
_strict_mode=True
)
A nickname is a human-readable string that uniquely identifies a Google user, akin to a username. For some users, this nickname is an email address, but for other users, a different nickname is used.
A user is a Google Accounts user.
federated_identity
and federated_provider
are decommissioned and should
not be used.
Args | |
---|---|
email
|
An optional string of the user's email address. It defaults to the current user's email address. |
federated_identity
|
Decommissioned, don't use. |
federated_provider
|
Decommissioned, don't use. |
Raises | |
---|---|
UserNotFoundError
|
If the user is not logged in and both email and
federated_identity are empty.
|
Methods
auth_domain
auth_domain()
Obtains the user's authentication domain.
Returns | |
---|---|
A string containing the authentication domain. This method is internal and should not be used by client applications. |
email
email()
Returns the user's email address.
federated_identity
federated_identity()
Decommissioned, don't use.
Returns | |
---|---|
A string containing the federated identity of the user. If the user is not
a federated user, None is returned.
|
federated_provider
federated_provider()
Decommissioned, don't use.
Returns | |
---|---|
A string containing the federated provider. If the user is not a federated
user, None is returned.
|
nickname
nickname()
Returns the user's nickname.
The nickname will be a unique, human readable identifier for this user with respect to this application. It will be an email address for some users, and part of the email address for some users.
Returns | |
---|---|
The nickname of the user as a string. |
user_id
user_id()
Obtains the user ID
of the user.
Returns | |
---|---|
A permanent unique identifying string or None . If the email address was
set explicitly, this will return None .
|
__eq__
__eq__(
other
)
Return self==value.
__ge__
__ge__(
other, NotImplemented=NotImplemented
)
Return a >= b. Computed by @total_ordering from (not a < b).
__gt__
__gt__(
other, NotImplemented=NotImplemented
)
Return a > b. Computed by @total_ordering from (not a < b) and (a != b).
__le__
__le__(
other, NotImplemented=NotImplemented
)
Return a <= b. Computed by @total_ordering from (a < b) or (a == b).
__lt__
__lt__(
other
)
Return self<value.
__ne__
__ne__(
other
)
Return self!=value.