system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.cubrid system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.gii system.i18n system.i18n.gettext system.logging system.test system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.form system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers zii.behaviors zii.widgets zii.widgets.grid zii.widgets.jui

IUserIdentity

system.base
继承 interface IUserIdentity
子类 CBaseUserIdentity, CUserIdentity
可用自 1.0
源码 framework/base/interfaces.php
IUserIdentity interface is implemented by a user identity class.

An identity represents a way to authenticate a user and retrieve information needed to uniquely identity the user. It is normally used with the user application component.

公共方法

隐藏继承的方法

方法描述被定义在
authenticate() Authenticates the user. IUserIdentity
getId() Returns a value that uniquely represents the identity. IUserIdentity
getIsAuthenticated() Returns a value indicating whether the identity is authenticated. IUserIdentity
getName() Returns the display name for the identity (e.g. username). IUserIdentity
getPersistentStates() Returns the additional identity information that needs to be persistent during the user session. IUserIdentity

方法详情

authenticate() 方法
abstract public boolean authenticate()
{return} boolean whether authentication succeeds.
源码: framework/base/interfaces.php#255 (显示)
public function authenticate();

Authenticates the user. The information needed to authenticate the user are usually provided in the constructor.

getId() 方法
abstract public mixed getId()
{return} mixed a value that uniquely represents the identity (e.g. primary key value).
源码: framework/base/interfaces.php#265 (显示)
public function getId();

Returns a value that uniquely represents the identity.

getIsAuthenticated() 方法
abstract public boolean getIsAuthenticated()
{return} boolean whether the identity is valid.
源码: framework/base/interfaces.php#260 (显示)
public function getIsAuthenticated();

Returns a value indicating whether the identity is authenticated.

getName() 方法
abstract public string getName()
{return} string the display name for the identity.
源码: framework/base/interfaces.php#270 (显示)
public function getName();

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

getPersistentStates() 方法
abstract public array getPersistentStates()
{return} array additional identity information that needs to be persistent during the user session (excluding id).
源码: framework/base/interfaces.php#275 (显示)
public function getPersistentStates();

Returns the additional identity information that needs to be persistent during the user session.