Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CDN
      • Resource
    • CloudMonitoring
      • Collection
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Collection
      • Enum
      • Resource
    • Networking
      • Resource
    • ObjectStore
      • Constants
      • Enum
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • Role
  • Tenant
  • Token
  • User
  • Overview
  • Namespace
  • Class
  • Tree

Class User

User class which encapsulates functionality for a user.

A user is a digital representation of a person, system, or service who consumes cloud services. Users have credentials and may be assigned tokens; based on these credentials and tokens, the authentication service validates that incoming requests are being made by the user who claims to be making the request, and that the user has the right to access the requested resources. Users may be directly assigned to a particular tenant and behave as if they are contained within that tenant.

OpenCloud\Common\Base
Extended by OpenCloud\Common\Resource\BaseResource
Extended by OpenCloud\Common\Resource\PersistentResource
Extended by OpenCloud\Common\PersistentObject
Extended by OpenCloud\Identity\Resource\User
Namespace: OpenCloud\Identity\Resource
Package: OpenCloud\Identity\Resource
Located at OpenCloud/Identity/Resource/User.php
Methods summary
public object
# createJson( )

Provides JSON for create request body

Provides JSON for create request body

Returns

object
object

Throws

RuntimeException
\RuntimeException

Overrides

OpenCloud\Common\Resource\PersistentResource::createJson()
public
# setDefaultRegion( mixed $region )

Parameters

$region
the default region
public string
# getDefaultRegion( )

Returns

string
Get the default region
public
# setDomainId( mixed $domainId )

Parameters

$domainId
the domain ID
public string
# getDomainId( )

Returns

string
Get the domain ID
public
# setId( mixed $id )

Parameters

$id
the ID
public integer
# getId( )

Returns

integer
Get the ID
public
# setUsername( mixed $username )

Parameters

$username
the username
public string
# getUsername( )

Returns

string
Get the username
public
# setEmail( mixed $email )

Parameters

$email
the email
public string
# getEmail( )

Returns

string
Get the email
public
# setEnabled( mixed $enabled )

Parameters

$enabled
the enabled flag
public boolean
# getEnabled( )

Returns

boolean
Get the enabled flag
public boolean
# isEnabled( )

Returns

boolean
Check whether this user is enabled or not
public
# setPassword( mixed $password )

Parameters

$password
the password
public string
# getPassword( )

Returns

string
Get the password
public string
# primaryKeyField( )

Returns

string
string

Overrides

OpenCloud\Common\Resource\BaseResource::primaryKeyField()
public
# updateJson( mixed $params = array() )

Provides JSON for update request body

Provides JSON for update request body

Overrides

OpenCloud\Common\Resource\PersistentResource::updateJson()
public Guzzle\Http\Message\Response
# updatePassword( mixed $newPassword )

This operation will set the user's password to a new value.

This operation will set the user's password to a new value.

Parameters

$newPassword
new password to use for this user

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response
public array|null
# getOtherCredentials( )

This operation lists a user's non-password credentials for all authentication methods available to the user.

This operation lists a user's non-password credentials for all authentication methods available to the user.

Returns

array|null
array|null
public string|null
# getApiKey( )

Get the API key for this user.

Get the API key for this user.

Returns

string|null
string|null
public string|null
# resetApiKey( )

Reset the API key for this user to a new arbitrary value (which is returned).

Reset the API key for this user to a new arbitrary value (which is returned).

Returns

string|null
string|null
public Guzzle\Http\Message\Response
# addRole( mixed $roleId )

Add a role, specified by its ID, to a user.

Add a role, specified by its ID, to a user.

Parameters

$roleId

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response
public Guzzle\Http\Message\Response
# removeRole( mixed $roleId )

Remove a role, specified by its ID, from a user.

Remove a role, specified by its ID, from a user.

Parameters

$roleId

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response
public OpenCloud\Common\Collection\PaginatedIterator
# getRoles( )

Get all the roles for which this user is associated with.

Get all the roles for which this user is associated with.

Returns

OpenCloud\Common\Collection\PaginatedIterator
\OpenCloud\Common\Collection\PaginatedIterator
public Guzzle\Http\Message\Response
# update( array $params = array() )

Update a resource

Update a resource

Parameters

$params

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response

Overrides

OpenCloud\Common\Resource\PersistentResource::update()
Methods inherited from OpenCloud\Common\Resource\PersistentResource
checkExtension(), create(), delete(), generateJsonPatch(), getAlias(), getUpdateablePropertiesAsArray(), noCreate(), noDelete(), noUpdate(), recursivelyAliasPropertyValue(), refresh(), refreshFromLocationUrl(), refreshFromParent(), waitFor()
Methods inherited from OpenCloud\Common\Resource\BaseResource
__construct(), findLink(), getClient(), getMetadata(), getParent(), getService(), getUrl(), jsonCollectionElement(), jsonCollectionName(), jsonName(), parseResponse(), resourceName(), setMetadata(), setParent(), setService()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getPatchHeaders(), getProperty(), hasLogger(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
Constants inherited from OpenCloud\Common\Base
PATCH_CONTENT_TYPE
Properties summary
protected array $createKeys
#array('username', 'email', 'enabled', 'password')
protected array $updateKeys
#array('username', 'email', 'enabled', 'RAX-AUTH:defaultRegion', 'RAX-AUTH:domainId', 'id')
protected array $aliases

The aliases configure for the properties of the instance.

The aliases configure for the properties of the instance.

#array( 'name' => 'username', 'RAX-AUTH:defaultRegion' => 'defaultRegion', 'RAX-AUTH:domainId' => 'domainId', 'OS-KSADM:password' => 'password' )
protected static string $url_resource
#'users'
protected static string $json_name
#'user'
Properties inherited from OpenCloud\Common\Resource\BaseResource
$metadata, $parent, $service
API documentation generated by ApiGen 2.8.0