REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 3.93 KB
Close
/home/jambtst2015/www/framework/web/auth/CBaseUserIdentity.php
Text
Base64
<?php /** * CBaseUserIdentity class file * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.yiiframework.com/ * @copyright 2008-2013 Yii Software LLC * @license http://www.yiiframework.com/license/ */ /** * CBaseUserIdentity is a base class implementing {@link 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 {@link IUserIdentity::authenticate} * and {@link IUserIdentity::getId} that are required by the {@link IUserIdentity} * interface. * * @property mixed $id A value that uniquely represents the identity (e.g. primary key value). * The default implementation simply returns {@link name}. * @property string $name The display name for the identity. * The default implementation simply returns empty string. * @property array $persistentStates The identity states that should be persisted. * @property boolean $isAuthenticated Whether the authentication is successful. * * @author Qiang Xue <qiang.xue@gmail.com> * @package system.web.auth * @since 1.0 */ abstract class CBaseUserIdentity extends CComponent implements IUserIdentity { const ERROR_NONE=0; const ERROR_USERNAME_INVALID=1; const ERROR_PASSWORD_INVALID=2; const ERROR_NOTMAPPED_INVALID=3; const ERROR_VALIDITY_INVALID=4; const ERROR_UNKNOWN_IDENTITY=100; /** * @var integer the authentication error code. If there is an error, the error code will be non-zero. * Defaults to 100, meaning unknown identity. Calling {@link authenticate} will change this value. */ public $errorCode=self::ERROR_UNKNOWN_IDENTITY; /** * @var string the authentication error message. Defaults to empty. */ public $errorMessage=''; private $_state=array(); /** * Returns a value that uniquely represents the identity. * @return mixed a value that uniquely represents the identity (e.g. primary key value). * The default implementation simply returns {@link name}. */ public function getId() { return $this->getName(); } /** * Returns the display name for the identity (e.g. username). * @return string the display name for the identity. * The default implementation simply returns empty string. */ public function getName() { return ''; } /** * Returns the identity states that should be persisted. * This method is required by {@link IUserIdentity}. * @return array the identity states that should be persisted. */ public function getPersistentStates() { return $this->_state; } /** * Sets an array of persistent states. * * @param array $states the identity states that should be persisted. */ public function setPersistentStates($states) { $this->_state = $states; } /** * Returns a value indicating whether the identity is authenticated. * This method is required by {@link IUserIdentity}. * @return boolean whether the authentication is successful. */ public function getIsAuthenticated() { return $this->errorCode==self::ERROR_NONE; } /** * Gets the persisted state by the specified name. * @param string $name the name of the state * @param mixed $defaultValue the default value to be returned if the named state does not exist * @return mixed the value of the named state */ public function getState($name,$defaultValue=null) { return isset($this->_state[$name])?$this->_state[$name]:$defaultValue; } /** * Sets the named state with a given value. * @param string $name the name of the state * @param mixed $value the value of the named state */ public function setState($name,$value) { $this->_state[$name]=$value; } /** * Removes the specified state. * @param string $name the name of the state */ public function clearState($name) { unset($this->_state[$name]); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
CAccessControlFilter.php
12.00 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CAuthAssignment.php
2.45 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CAuthItem.php
7.41 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CAuthManager.php
6.49 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CBaseUserIdentity.php
3.93 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CDbAuthManager.php
18.90 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CPhpAuthManager.php
15.96 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CUserIdentity.php
2.20 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CWebUser.php
27.35 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error_log
34.28 KB
lrw-r--r--
2025-11-04 15:17:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
schema-mssql.sql
1.24 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
schema-mysql.sql
1.28 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
schema-oci.sql
1.24 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
schema-pgsql.sql
1.24 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
schema-sqlite.sql
1.24 KB
lrw-r--r--
2024-11-22 17:53:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).