Class User
This is the model class for table "x2_users".
- CComponent
- CModel implements IteratorAggregate, ArrayAccess
- CActiveRecord
- User
Located at x2engine/protected/modules/users/models/User.php
public static
|
|
public
string
|
|
public
array
|
#
behaviors( )
Returns a list of behaviors that this model should behave as. The return value should be an array of behavior configurations indexed by behavior names. Each behavior configuration can be either a string specifying the behavior class or an array of the following structure: 'behaviorName'=>array( 'class'=>'path.to.BehaviorClass', 'property1'=>'value1', 'property2'=>'value2', ) |
public
boolean
|
#
beforeValidate( )
Used to automatically set the user alias to the user name when a user is created. |
public
array
|
|
public
array
|
|
public
array
|
#
scopes( )
Returns the declaration of named scopes. A named scope represents a query criteria that can be chained together with other named scopes and applied to a query. This method should be overridden by child classes to declare named scopes for the particular AR classes. For example, the following code declares two named scopes: 'recently' and 'published'. return array( 'published'=>array( 'condition'=>'status=1', ), 'recently'=>array( 'order'=>'create_time DESC', 'limit'=>5, ), ); If the above scopes are declared in a 'Post' model, we can perform the following queries: $posts=Post::model()->published()->findAll(); $posts=Post::model()->published()->recently()->findAll(); $posts=Post::model()->published()->with('comments')->findAll(); Note that the last query is a relational query. |
public
boolean
|
|
public
|
#
afterDelete( )
This method is invoked after deleting a record. The default implementation
raises the |
public static
|
|
public
array
|
|
public static
object
|
|
public static
|
|
public static
array
|
|
public static
type
|
|
public static
|
|
public static
|
|
public
|
|
public static
|
|
public static
array
|
|
public static
|
|
public static
|
|
public static
string
|
#
getUserLinks( integer|array|string $users, boolean $makeLinks = true, mixed $useFullName = true )
Generate a link to a user or group. |
public static
|
|
public
array
|
|
public
CActiveDataProvider
|
|
public
|
#
userAliasUnique( type $attribute, type $params = array() )
Validator for usernames and userAliases that enforces uniqueness across both fields. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
validateUserDisable( )
Custom validation rule to ensure the primary admin account cannot be disabled |
__call(),
__construct(),
__get(),
__isset(),
__set(),
__sleep(),
__unset(),
addRelatedRecord(),
afterFind(),
afterFindInternal(),
afterSave(),
applyScopes(),
attributeNames(),
beforeCount(),
beforeFind(),
beforeFindInternal(),
beforeSave(),
cache(),
count(),
countByAttributes(),
countBySql(),
defaultScope(),
delete(),
deleteAll(),
deleteAllByAttributes(),
deleteByPk(),
equals(),
exists(),
find(),
findAll(),
findAllByAttributes(),
findAllByPk(),
findAllBySql(),
findByAttributes(),
findByPk(),
findBySql(),
getActiveFinder(),
getActiveRelation(),
getAttribute(),
getAttributeLabel(),
getAttributes(),
getCommandBuilder(),
getDbConnection(),
getDbCriteria(),
getIsNewRecord(),
getMetaData(),
getOldPrimaryKey(),
getPrimaryKey(),
getRelated(),
getTableAlias(),
getTableSchema(),
hasAttribute(),
hasRelated(),
init(),
insert(),
instantiate(),
offsetExists(),
onAfterDelete(),
onAfterFind(),
onAfterSave(),
onBeforeCount(),
onBeforeDelete(),
onBeforeFind(),
onBeforeSave(),
populateRecord(),
populateRecords(),
primaryKey(),
query(),
refresh(),
refreshMetaData(),
resetScope(),
save(),
saveAttributes(),
saveCounters(),
setAttribute(),
setDbCriteria(),
setIsNewRecord(),
setOldPrimaryKey(),
setPrimaryKey(),
setTableAlias(),
together(),
update(),
updateAll(),
updateByPk(),
updateCounters(),
with()
|
addError(),
addErrors(),
afterConstruct(),
afterValidate(),
clearErrors(),
createValidators(),
generateAttributeLabel(),
getError(),
getErrors(),
getIterator(),
getSafeAttributeNames(),
getScenario(),
getValidatorList(),
getValidators(),
hasErrors(),
isAttributeRequired(),
isAttributeSafe(),
offsetGet(),
offsetSet(),
offsetUnset(),
onAfterConstruct(),
onAfterValidate(),
onBeforeValidate(),
onUnsafeAttribute(),
setAttributes(),
setScenario(),
unsetAttributes(),
validate()
|
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
integer |
STATUS_ACTIVE
|
1 |
|
integer |
STATUS_INACTIVE
|
0 |
BELONGS_TO,
HAS_MANY,
HAS_ONE,
MANY_MANY,
STAT
|
public static
array
|
$recentItemTypes | array(
'a' => 'Accounts',
'b' => 'BugReports',
'c' => 'Contacts',
'd' => 'Docs',
'g' => 'Groups',
'l' => 'X2Leads',
'm' => 'Media',
'o' => 'Opportunity',
'p' => 'Campaign',
'q' => 'Quote',
'r' => 'Product',
's' => 'Services',
't' => 'Actions',
'w' => 'Workflow',
) |
|
public
boolean
|
$dbPersistentGridSettings | false |
#
If true, grid views displaying models of this type will have their filter
and |
$db
|
public
string
|
$alias |
#
The user's alias, if set, or username otherwise. The user's alias is the "human-friendly" username that the user can configure to be whatever they choose. The username, however, cannot be changed, as there are references to it everywhere. |
public
string
|
$fullName |
#
The full name of the user, using the format defined in the general application settings. |
$attributes,
$commandBuilder,
$dbConnection,
$dbCriteria,
$isNewRecord,
$metaData,
$oldPrimaryKey,
$primaryKey,
$tableAlias,
$tableSchema
|
$errors,
$iterator,
$safeAttributeNames,
$scenario,
$validatorList,
$validators
|