Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CAccessControlFilter
  • CAccessRule
  • CAuthAssignment
  • CAuthItem
  • CAuthManager
  • CBaseUserIdentity
  • CDbAuthManager
  • CPhpAuthManager
  • CUserIdentity
  • CWebUser
  • X2WebUser
  • Overview
  • Package
  • Class
  • Tree

Class CBaseUserIdentity

CBaseUserIdentity is a base class implementing IUserIdentity.

CBaseUserIdentity implements the scheme for representing identity information that needs to be persisted. It also provides the way to represent the authentication errors.

Derived classes should implement IUserIdentity::authenticate() and IUserIdentity::getId() that are required by the IUserIdentity interface.

CComponent
Extended by CBaseUserIdentity implements IUserIdentity

Direct known subclasses

CUserIdentity

Indirect known subclasses

UserIdentity
Abstract
Package: system\web\auth
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/auth/CBaseUserIdentity.php
Methods summary
public mixed
# getId( )

Returns a value that uniquely represents the identity.

Returns a value that uniquely represents the identity.

Returns

mixed
a value that uniquely represents the identity (e.g. primary key value). The default implementation simply returns name.

Implementation of

IUserIdentity::getId()
public string
# getName( )

Returns the display name for the identity (e.g. username).

Returns the display name for the identity (e.g. username).

Returns

string
the display name for the identity. The default implementation simply returns empty string.

Implementation of

IUserIdentity::getName()
public array
# getPersistentStates( )

Returns the identity states that should be persisted. This method is required by IUserIdentity.

Returns the identity states that should be persisted. This method is required by IUserIdentity.

Returns

array
the identity states that should be persisted.

Implementation of

IUserIdentity::getPersistentStates()
public
# setPersistentStates( array $states )

Sets an array of persistent states.

Sets an array of persistent states.

Parameters

$states
array
$states the identity states that should be persisted.
public boolean
# getIsAuthenticated( )

Returns a value indicating whether the identity is authenticated. This method is required by IUserIdentity.

Returns a value indicating whether the identity is authenticated. This method is required by IUserIdentity.

Returns

boolean
whether the authentication is successful.

Implementation of

IUserIdentity::getIsAuthenticated()
public mixed
# getState( string $name, mixed $defaultValue = null )

Gets the persisted state by the specified name.

Gets the persisted state by the specified name.

Parameters

$name
string
$name the name of the state
$defaultValue
mixed
$defaultValue the default value to be returned if the named state does not exist

Returns

mixed
the value of the named state
public
# setState( string $name, mixed $value )

Sets the named state with a given value.

Sets the named state with a given value.

Parameters

$name
string
$name the name of the state
$value
mixed
$value the value of the named state
public
# clearState( string $name )

Removes the specified state.

Removes the specified state.

Parameters

$name
string
$name the name of the state
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Methods inherited from IUserIdentity
authenticate()
Constants summary
integer ERROR_NONE 0
#
integer ERROR_USERNAME_INVALID 1
#
integer ERROR_PASSWORD_INVALID 2
#
integer ERROR_UNKNOWN_IDENTITY 100
#
Properties summary
public integer $errorCode CBaseUserIdentity::ERROR_UNKNOWN_IDENTITY
#

the authentication error code. If there is an error, the error code will be non-zero. Defaults to 100, meaning unknown identity. Calling IUserIdentity::authenticate() will change this value.

the authentication error code. If there is an error, the error code will be non-zero. Defaults to 100, meaning unknown identity. Calling IUserIdentity::authenticate() will change this value.

public string $errorMessage ''
#

the authentication error message. Defaults to empty.

the authentication error message. Defaults to empty.

Magic properties summary
public mixed $id
#

A value that uniquely represents the identity (e.g. primary key value). The default implementation simply returns name.

A value that uniquely represents the identity (e.g. primary key value). The default implementation simply returns name.

public string $name
#

The display name for the identity. The default implementation simply returns empty string.

The display name for the identity. The default implementation simply returns empty string.

public array $persistentStates
#

The identity states that should be persisted.

The identity states that should be persisted.

public boolean $isAuthenticated
#

Whether the authentication is successful.

Whether the authentication is successful.

API documentation generated by ApiGen 2.8.0