App Engine PHP SDK  v1 rev.445
The PHP runtime is available as an experimental Preview feature.
Static Public Member Functions | List of all members
google\appengine\api\users\UserService Class Reference

Static Public Member Functions

static createLoginURL ($destination_url=null, $federated_identity=null)
 
static createLogoutURL ($destination_url)
 
static getCurrentUser ()
 
static isCurrentUserAdmin ()
 

Member Function Documentation

static google\appengine\api\users\UserService::createLoginURL (   $destination_url = null,
  $federated_identity = null 
)
static

Computes the login URL for redirection.

Parameters
string$destination_urlThe desired final destination URL for the user once login is complete. If 'destinationURL' does not have a host specified, we will use the host from the current request.
string$federated_identityThe parameter is used to trigger OpenId Login flow, an empty value will trigger Google OpenID Login by default.
Returns
string Login URL. If federatedIdentity is set, this will be a federated login using the specified identity. If not, this will use Google Accounts.
Exceptions
UsersExceptionIf there was a problem using the Users service.
static google\appengine\api\users\UserService::createLogoutURL (   $destination_url)
static

Computes the logout URL for this request and specified destination URL, for both federated login App and Google Accounts App.

Parameters
string$destination_urlThe desired final destination URL for the user once logout is complete. If 'destinationURL' does not have a host specified, we will use the host from the current request.
Returns
string Logout URL.
Exceptions
UsersExceptionIf there was a problem using the Users service.
static google\appengine\api\users\UserService::getCurrentUser ( )
static
Returns
User The object representing the current signed in user, or null if no user is signed in.
static google\appengine\api\users\UserService::isCurrentUserAdmin ( )
static

Return true if the user making this request is an admin for this application, false otherwise.

We specifically make this a separate function, and not a member function of the User class, because admin status is not persisted in the datastore. It only exists for the user making this request right now.

Returns
boolean Whether the current user is an administrator of the application.

The documentation for this class was generated from the following file: