Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



google/appengine/api/users/User.php

Table of Contents
Copyright 2007 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

\google\appengine\api\users\User

Package: Default
A user.

We provide the email address, nickname, and id for a user.

A nickname is a human-readable string which uniquely identifies a Google user, akin to a username. It will be an email address for some users, but not all.

A user could be a Google Accounts user or a federated login user.

Federated identity and federated provider are only avaliable for federated users.

Methods

method public __construct (string $email = null, string $federated_identity = null, string $federated_provider = null,  $user_id = null) : void

Constructor.

Parameters
Name Type Description
$email string

An optional string of the user's email address. It defaults to the current user's email address.

$federated_identity string

The federated identity of user. It defaults to the current user's federated identity.

$federated_provider string

The federated provider url of user.

$user_id
Throws
Exception Description
\InvalidArgumentException Thrown if both email and federated identity are empty.
method public __toString () : string

Magic method that PHP uses when the object is treated like a string.

Returns
Type Description
string The attributes of this user.
method public getAuthDomain () : string

Return this user's auth domain.

This method is internal and should not be used by client applications.

Returns
Type Description
string The user's authentication domain.
method public getEmail () : string

Return this user's email address.

Returns
Type Description
string The user's email address.
method public getFederatedIdentity () : string

Return this user's federated identity, null if not a federated user.

Returns
Type Description
string The user's federated identity.
method public getFederatedProvider () : string

Return this user's federated provider, null if not a federated user.

Returns
Type Description
string The user's federated provider.
method public getNickname () : string

Return this 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, part of the email address for some users, and the federated identity for federated users who have not asserted an email address.

Returns
Type Description
string The user's nickname.
method public getUserId () : string

Return either a permanent unique identifying string or null.

If the email address was set explicity, this will return null.

Returns
Type Description
string The user's UserId.
Documentation was generated by phpDocumentor 2.0.0a12 .